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 |
What is wrong in this statement? scanf(“%d”,whatnumber);
main() { int a[10]; printf("%d",*a+1-*a+3); }
what are the languages used in c#?
void main() { int x=25,y=32; clrscr(); x=x++ + y++; y=++x + ++y; printf("%d%d",x,y); }
write a proram to reverse the string using switch case?
How are 16- and 32-bit numbers stored?
What do you mean by a sequential access file?
Why c is procedure oriented?
What is your stream meaning?
What is a string?
How to print %d in output
What is default value of global variable in c?