[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Data Structures :: Strings - Discussion

Home > Data Structures > Strings > MCQs Questions Discussion

73 / 2

What is the following code segment doing?

void fn( ){
char c;
cin.get(c);                   
if (c != '\n') {
fn( );
cout.put(c);
}
}

AThe string entered is printed as it is

BThe string entered is printed in reverse order.

CIt will go in an infinite loop.

DIt will print an empty line.

Answer: Option (Login/Signup)

Show Explanation

Asked In :: Capgemini Societe Generale

Post Your Answer Here:     

No Discussion on this question yet!