write C code to reverse a string such that if i/p is "abc
defg hij klmno pqrs tuv wxyz"
and the o/p should be "cba gfed jih onmlk srqp vut zyxw"
Answers were Sorted based on User's Feedback
Answer / naresh
man()
{
char ch[33];
printf("enter the string");
for(int i=0;i<33;i++)
scanf("%c",&ch[i]);
int k=0;
for(i=0;ch[i]!='/o';i++)
{
if(ch[i]==" ")
{ int n=i;
while(i>=k)
{
printf("%c",ch[i]);
i--;
}
k=n;
}
}
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / bipin chandra sai.s
hay just use concatenation of strings method
{
int temp=int a;
int a=int b;
int b=int temp;
}
| Is This Answer Correct ? | 2 Yes | 6 No |
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
Reverse a string word by word??
how to write a program which adds two numbers without using semicolon in c
Which is better between malloc and calloc?
#include <stdio.h> int main() { if ("X" <"x") printf("X smaller than x "); } my question is whats the mistake in this program? find it and please tell me..
how to find sum of 5 digits in C?
What is a ternary operator in c?
write a program wch produces its own source code aas its output?
How will you delete a node in DLL?
How do you write a program which produces its own source code as its output?
Explain how to reverse singly link list.
What is fflush() function?