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
Explain what is the heap?
How can I recover the file name given an open stream?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
What is the difference between exit() and _exit() function in c?
What are pointers in C? Give an example where to illustrate their significance.
What is volatile variable in c?
How can a process change an environment variable in its caller?
What is #ifdef ? What is its application?
What does %c do in c?
What is difference between union All statement and Union?
c program for searching a student details among 10 student details
What is #include called?
What is a program?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
How do we declare variables in c?