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
Can static variables be declared in a header file?
How can I dynamically allocate arrays?
Is Exception handling possible in c language?
what will be the output for the following main() { printf("hi" "hello"); }
What is a spanning Tree?
When is the “void” keyword used in a function?
What is the most efficient way to store flag values?
What is nested structure with example?
What is pointer to pointer in c?
Explain how can I convert a number to a string?
Why is c called c not d or e?
What is volatile variable in c?
Give differences between - new and malloc() , delete and free() ?
Write a code of a general series where the next element is the sum of last k terms.
What are different storage class specifiers in c?