Write a C program where input is: "My name is xyz". output
is: "xyz is name My".
Answer Posted / suneel
step1: First find length of the string
step2: Reverse the string and stored in another string
temp[]="zxy si eman ym";
step3:
Store each charecter in the temp[] to stack
when it is not a space
step4: If it is space then pop the all characters in the stack
and stored in o/p
step5: The process is done upto null
| Is This Answer Correct ? | 14 Yes | 7 No |
Post New Answer View All Answers
Is it better to bitshift a value than to multiply by 2?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What is union in c?
What is the use of getchar functions?
Does c have function or method?
The file stdio.h, what does it contain?
What is c language in simple words?
given post order,in order construct the corresponding binary tree
What is static identifier?
how many errors in c explain deply
How can I get random integers in a certain range?
Explain enumerated types.
How will you declare an array of three function pointers where each function receives two ints and returns a float?
What is the function of multilevel pointer in c?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.