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


Please Help Members By Posting Answers For Below Questions

What is protected inheritance?

592


Do you know what are pure virtual functions?

638


What is time h in c++?

585


What is an inclusion guard?

615


How to demonstrate the use of a variable?

642






When are exception objects created?

607


Why is c++ so fast?

529


What is lambda expression c++?

576


Which programming language is best to learn first?

581


Is c or c++ more useful?

574


Explain what you mean by a pointer.

626


What is implicit pointer in c++?

600


What is flag in computer?

601


What methods can be overridden in java?

667


Why #include is used?

613