write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
Answer Posted / piyush kumar
char gacstring="piyush";
int giindex=0;
voidfnreverse();
void main()
while(gacstring[giindex]!='\0'){
giindex++;
voidfnreverse();
}
if(giindex>0)
giindex--;
printf("%c",chargacstring);
return 0;
}
| Is This Answer Correct ? | 4 Yes | 14 No |
Post New Answer View All Answers
Differentiate between the = symbol and == symbol?
Explain what are bus errors, memory faults, and core dumps?
Describe how arrays can be passed to a user defined function
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
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 is local and global variable in c?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
In a switch statement, what will happen if a break statement is omitted?
What are the types of operators in c?
What does struct node * mean?
Explain what is the benefit of using const for declaring constants?
What are the types of i/o functions?
What are identifiers and keywords in c?
What is #error and use of it?