Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

ISRO | ISRO CS 2014 | Question 3

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

What is the output of the following C program?




#include<stdio.h>
#define SQR(x) (x*x)
int main()
{
    int a;
    int b=4;
    a=SQR(b+2);
    printf("%d\n",a);
    return 0;
}

(A) 14
(B) 36
(C) 18
(D) 20


Answer: (A)

Explanation: #define SQR(x) (x*x)
a = SQR(b+2);
a = (b + 2*b + 2) = (4 + 2*4 + 2) = 14

So, option (A) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 07 May, 2018
Like Article
Save Article
Similar Reads