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
How pointer is different from array?
What is the purpose of sprintf?
How does normalization of huge pointer works?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
Explain About fork()?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
Explain what is a const pointer?
Function calling procedures? and their differences? Why should one go for Call by Reference?
What is the full form of getch?
Is main is a keyword in c?
What is clrscr in c?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
What is the data segment that is followed by c?
Explain the priority queues?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above