Answer Posted / rohit_kamlakar
#include<iostream.h>
#include<string.h>
#include<stdio.h>
#include<conio.h>
void main()
{
int length,i,j;
char string[500];clrscr();
printf("Enter the string=");
gets(string);
length=strlen(string); int y=length,z=0;
for(i=length-1;i>=0;i--)
{
if(int(string[i])==32)
{ printf(" ");
for(j=i+1;j<length;j++)
{
printf("%c",string[j]);
z++;
}
length=y-z;
}
if(i==0)
{ j=i; printf(" ");
while(int(string[j])!=32)
{
printf("%c",string[j]);
j++;
}
}
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Explain the binary height balanced tree?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
develop algorithms to add polynomials (i) in one variable
What are the different types of constants?
What is wrong with this program statement?
What does sizeof int return?
what is the structure pointer?
Using which language Test cases are added in .ptu file of RTRT unit testing???
Can you pass an entire structure to functions?
What does do in c?
What is c standard library?
please give me some tips for the placement in the TCS.
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
Should a function contain a return statement if it does not return a value?
What does %d do?