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
What is a loop?
What is 2 d array in c?
How are strings stored in c?
When should you not use a type cast?
What is the use of typedef in c?
How pointers are declared?
What is meant by type casting?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Explain how are 16- and 32-bit numbers stored?
How old is c programming language?
Do pointers store the address of value or the actual value of a variable?
How can you tell whether two strings are the same?
What does void main () mean?
Why is c not oop?
What happens if header file is included twice?