Reverse a string word by word??

Answer Posted / dally

#include<stdio.h>
#include<conio.h>

int main()
{
char array1[] = "STRING FOR TESTNG";
char array2[20],i=0;
int count;
count = strlen(array);
for(count;count>1;count--)
{
array2[i]= array1[count];
i++;
}
printf("%s\n",array2);

}

Is This Answer Correct ?    0 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is extern storage class in c?

715


What are the 3 types of structures?

768


Explain how can you tell whether two strings are the same?

811


What is a sequential access file?

872


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

2474


Explain how do you generate random numbers in c?

815


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

804


What is difference between array and structure in c?

790


What is the most efficient way to store flag values?

901


What are reserved words?

852


What is malloc and calloc?

801


What are identifiers in c?

885


What is c system32 taskhostw exe?

792


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

820


What are the different types of objects used in c?

750