Open In App

C | Input and Output | Question 2

Predict output of the following program 




#include <stdio.h>
int main()
{
   printf("\new_c_question\b\r");
   printf("geeksforgeeks");
   getchar();
   return 0;
}

(A)



ew_c_question
geeksforgeeks
 

(B)



new_c_ques
geeksforgeeks
 

(C)

geeksforgeeks
 

(D)

Depends on terminal configuration


Answer: (D)
Explanation:

See https://stackoverflow.com/questions/17236242/usage-of-b-and-r-in-c/%22

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :