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
praagnovation
What is assignment operator?
Explain why can’t constant values be used to define an array’s initial size?
What is gets() function?
write a program fibonacci series and palindrome program in c
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is adt in c programming?
Explain what are the __date__ and __time__ preprocessor commands?
What is the size of a union variable?
What is 02d in c?
Explain what is the benefit of using enum to declare a constant?
What are inbuilt functions in c?
What is the purpose of sprintf() function?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What does %c do in c?