simple c++ program for "abcde123ba" convert "ab321edcba"
with out using string
Answer Posted / ragavan
#include<stdio.h>
#include<conio.h>
//Using recursive
void print( char c)
{
char a;
if(c=='\n')
return;
a=getchar();
print(a);
printf("%c",c);
return;
}
void main()
{
char c;
clrscr();
c= getchar();
print(c);
getch();
}
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can we distribute function templates and class templates in object libraries?
Difference between inline functions and macros?
Define whitespace in C++.
What are advantages of using friend classes?
What is the use of register keyword with the variables?
What is the copy-and-swap idiom?
How does list r; differs from list r();?
How one would use switch in a program?
What are the c++ access specifiers?
Can member data be public?
What is meant by the term name mangling in c++?
What is command line arguments in C++? What are its uses? Where we have to use this?
What is an object in c++?
What is private inheritance?
What is the advantage of c++ over c?