Skip to content
Related Articles

Related Articles

Improve Article
Algorithms Quiz | SP2 Contest 1 | Question 3
  • Last Updated : 28 Aug, 2018

What will be the output of the below C program?

#include <stdio.h>
int main() 
    int a = 2;
    if("%d=gfg", a);
    return 0;

(A) Compilation Error
(B) 2=gfg
(C) No Output
(D) 2

Answer: (C)

Explanation: There is no printf() statement in the above program, so the program will not print any output. Also, the program is syntactically error-free so there is no compilation error.

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :