A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. Consider the C program shown below.

#define print(x) printf("%d ", x)
int x;
void Q(int z)
{
z += x;
print(z);
}
void P(int *y)
{
int x = *y + 2;
Q(x);
*y = x - 1;
print(x);
}
main(void)
{
x = 5;
P(&x);
print(x);
}

The output of this program is
a. 12 7 6
b. 22 12 11
c. 14 6 6
d. 7 6 6
Answer:12 7 6
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: