Reverse a string word by word??

Answer Posted / vamsi

#include<stdio.h>
#include<conio.h>
void main()
{
char a[40],temp;
int count=0;
printf("enter the string :");
gets(a);
for(int i=40;a[i]!=a[1];i--)
printf (a[i]);
printf (a[1]);
}

Is This Answer Correct ?    1 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is strcpy() function?

762


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

1778


What is omp_num_threads?

687


How do you sort filenames in a directory?

818


What are volatile variables in c?

610






What is the use of typedef in c?

678


Explain a file operation in C with an example.

756


What is variable initialization and why is it important?

712


Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

764


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2375


How can I access an I o board directly?

728


What are run-time errors?

689


What is meant by initialization and how we initialize a variable?

682


Which is better oop or procedural?

712


what is the height of tree if leaf node is at level 3. please explain

1706