Question

1411113: Programming for Engineers Spring 2017 Class Quiz 4


c++
fast plz

0 0
Add a comment Improve this question Transcribed image text
Answer #1

code:

#include<iostream>
#include<string>
using namespace std;
void swap(char *c, char *d)
{
char t=*c;
*c=*d;
*d=t;
}
char * reverse(char arr[])
{
int i=0;
int len=0;
//find length
for(i=0;arr[i]!='\0';i++)
{
len++;
}
for(int j=0;j<=len/2;j++)
{
swap(arr[j],arr[len-j-1]);
}
return arr;
}
int main()
{
char arr[10];
cout<<"\nEnter the string of max length 10;";
cin>>arr;
cout<<"\nYour entered string is "<<arr;
cout<<"\nReverse of string is:"<<reverse(arr);
return 1;
}

output:

Add a comment
Know the answer?
Add Answer to:
c++ fast plz 1411113: Programming for Engineers Spring 2017 Class Quiz 4
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • it is an introduction to government class, and this is a quiz test so plz answer...

    it is an introduction to government class, and this is a quiz test so plz answer correct Which are valid ways to participate in politics? Discuss political issues with family and community members All of the Above Getting people to register to vote Voting Attend a city council meeting Become more educated about politics O Convince people to vote Write a letter to the editor o Work for a campaign O Wear a political t-shirt Engage with the news Go...

  • please solve it before 11:15 today Subject :C++ programming - Lab_9_Sec 51.pdf 1411113: Programming for Engineers...

    please solve it before 11:15 today Subject :C++ programming - Lab_9_Sec 51.pdf 1411113: Programming for Engineers Fall 2017/2018 LAB #9 Name: ID: Date Section Objectives: After completing this lab, you will be able to .Analyze a problem. .Implement the solution in C++ . Practice arrays and strings. Lab Exc. Mark Score Correct input/output Computational correctness Correct input/output Computational correctness Exercise#1: Number of occurrences in an array Write a program that fills an array with 10 random numbers between 0 and...

  • C #sharp Visual Studio Programming, Implement the array declaration and initialization for -For this quiz I...

    C #sharp Visual Studio Programming, Implement the array declaration and initialization for -For this quiz I attached (EXAMPLE of 10 questions).... Using arrays to format this quiz? using System; namespace Quiz {     class MainClass     {         public static void Main(string[] args)         {             Console.WriteLine("Welcome to the Quiz!");             Console.WriteLine("--------------------------------");             Console.WriteLine(" ");             //Questions                       var Question1 = "1. How many trees in a forest?";             var Question2 = "2. Sample Question";             var Question3 =...

  • show all work QUIZ # 1 CHAPTER 2-4. Physics for Scientists & Engineers ifC-A-B 4. Vectors...

    show all work QUIZ # 1 CHAPTER 2-4. Physics for Scientists & Engineers ifC-A-B 4. Vectors A and B are shown. What is the magnitude and direction of a vector C 60 A long jumper leaves the ground at an angle of 30° above the horizontal and at a speed of 11 m/s. a. b. 5. How far does he jump in the horizontal direction? What is the maximum height reached? mi 6. Convert 25 miles per hour hto meters...

  • Which is the correct answer Spring 2020 Section 902 (1) Quiz: chapter 4 quiz This Question:...

    Which is the correct answer Spring 2020 Section 902 (1) Quiz: chapter 4 quiz This Question: 1 pt + 3 of Refer to the following adjusted trial balance after the first year of operations. Credit Debit $1,600 8,200 400 19,500 Equipment Accounts Cash Accounts Receivable Office Supplies Equipment Accumulated Depreciation Accounts Payable Salaries Payable Uneared Revenue Common Stock Dividends O A. $26,150 O B. $23,350 O c. $22,350 OD. $21,350 $2,000 1,400 850 300 3,800 1.000 Click to select your...

  • plz do 4 and 5 clear writing plz no too long answers, class: automotive engineering U...

    plz do 4 and 5 clear writing plz no too long answers, class: automotive engineering U LIVILIZINI 4. What type of chart is recommended for monitoring diameter of a shaft? (3 points) 5. What type of chart is recommended for proportion of defects in a sample (3 points)

  • Language: C++ Course: Computer Programming for Engineers Write a program that creates two 3x4 arrays of...

    Language: C++ Course: Computer Programming for Engineers Write a program that creates two 3x4 arrays of type "int". Populate each array with random integers between 1 and 9. Also ask the user to choose whether they want to add the arrays or subtract the second array from the first array. Output all three arrays in tabular form.

  • Stat 201, Spring 2018 Darius Dziuda Quiz 3 Name The quiz is due on Tuesday, May...

    Stat 201, Spring 2018 Darius Dziuda Quiz 3 Name The quiz is due on Tuesday, May 1, 2018. Bring it to the class or email to me (no pietures will be accepted), dziudadad@ccsu.edu before 10:00 am of the due day. No results will be accepted after the class. Multiple Regression The following results were obtained from a multiple regression analysis. Source of Degrees Mean Sum of Squares 300 Variation of Freedomm Regression Error Total Square 60 24 612 a) How...

  • CompSci 251: Intermediate Computer Programming Spring 2017 -Java Lab 5 For this lab we will be...

    CompSci 251: Intermediate Computer Programming Spring 2017 -Java Lab 5 For this lab we will be looking at static, or class variables. Remember that where instances variables are associated with a particular instance, static variables are associated with the particular class. Specifically, if there are n instances of a class, there are n copies of an instance variable, but exactly one copy of a static variable (even when n = 0). Student - uniqueId : int - id: int -...

  • On a recent quiz, the class mean was 73 with a standard deviation of 4. a)...

    On a recent quiz, the class mean was 73 with a standard deviation of 4. a) Calculate the z-score for a person who received score of 77. b) Is this unusual?

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT