Answer Posted / vishnu948923
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<ctype.h>
void main()
{
int n,i,j=0;
char str[100];
char str1[100];
clrscr();
puts("Enter string:");
gets(str);
n=strlen(str);
for(i=n-1;i>=0;i--)
{
if(str[i]==' ')
{
str1[j]='\0';
strrev(str1);
printf("%s ",str1);
j=0;
}
else
{
str1[j++]=str[i];
}
}
if(i==-1)
{
str1[j]='\0';
strrev(str1);
printf("%s ",str1);
}
getch();
}
//strtoke
//isvowel
Is This Answer Correct ? | 24 Yes | 10 No |
Post New Answer View All Answers
What is an example of structure?
What is nested structure?
If I have a char * variable pointing to the name of a function ..
What are register variables? What are the advantage of using register variables?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
What does sizeof return c?
Explain how can you tell whether two strings are the same?
What is c++ used for today?
List some of the static data structures in C?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Why doesnt the call scanf work?
Is it better to use a macro or a function?
What is wrong with this code?
What is meant by operator precedence?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year