write a program in reverse the string without using
pointer,array,global variable declaration,lib fun only using
a function?
Answer Posted / r.s.guptha
void reverse()
{
char c = getchar();
if(c=='\n' || c=='\r')
return;
else
reverse();
putchar(c);
}
int main()
{
reverse();
return 0;
}
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
Why cant I open a file by its explicit path?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
Explain the difference between getch() and getche() in c?
Are bit fields portable?
What is property type c?
Explain how can I right-justify a string?
What is getch () for?
Do pointers need to be initialized?
Explain what does a function declared as pascal do differently?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
can we have joblib in a proc ?
How do you define a function?
What is the symbol indicated the c-preprocessor?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?