adplus-dvertising
frame-decoration

Question

What is the output of C program?
#define LOOP(a) for(int i=1;i<=a;i++) {printf("%d ",i);}
int main()
{
    LOOP(5);
    return 0;
}

a.

5

b.

5 5 5 5 5

c.

1 2 3 4 5

d.

Compiler error

Posted under C Programming

Answer: (d).Compiler error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of C program?