Open In App
Related Articles

Algorithms Quiz | SP2 Contest 1 | Question 3

Improve Article
Save Article
Like Article

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

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 28 Aug, 2018
Like Article
Save Article
Similar Reads