C Programming :: Basic Concepts - Discussion
Home > C Programming > Basic Concepts > MCQs Questions Discussion
26 / 90
What is the output of the following 'C' program?
#include<stdio.h>
void main()
{
printf("%d", printf("tim"));
}
#include<stdio.h>
void main()
{
printf("%d", printf("tim"));
}
Asyntax error
Btim3
Cgarbage value
Dprints tim and terminates
Answer: Option (Login/Signup)
Show Explanation
Hence, the output is tim3.
Asked In ::
STEP-BY-STEP
First, tim is printed. Then, we know that printf() function returns the number of characters as argument. Here, 'tim' contains 3 characters, so 3 will be printed alongwith.
Hence, the output is tim3.
Read Full Answer
Report Error
Please Login First Click Here