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 are the 4 data types?
Explain following declaration int *P(void); and int (*p)(char *a);
What is openmp in c?
What are volatile variables in c?
what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer
string reverse using recursion
which operator having lowest precedence?? a.)+ b.)++ c.)= d.)%
Explain how do you override a defined macro?
change to postfix a/(b+c*d-e)
How can you draw circles in C?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
What is zero based addressing?