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
Explain what are run-time errors?
write a program to copy the string using switch case?
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?
How many types of sorting are there in c?
Write a program to show the change in position of a cursor using c
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
What do you mean by dynamic memory allocation in c? What functions are used?
What is the g value paradox?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
What is meant by operator precedence?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
Write a program to reverse a string.
why wipro wase
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
Is r written in c?