1. 

What will be the output of the program?

#include<stdio.h>
#define MAN(x, y) ((x)>(y)) ? (x):(y);

int main()
{
    int i=10, j=5, k=0;
    k = MAN(++i, j++);
    printf("%d, %d, %d\n", i, j, k);
    return 0;
}

A. 12, 6, 12
B. 11, 5, 11
C. 11, 5, Garbage
D. 12, 6, Garbage

2. 

What will be the output of the program?

#include<stdio.h>
#define SQUARE(x) x*x

int main()
{
    float s=10, u=30, t=2, a;
    a = 2*(s-u*t)/SQUARE(t);
    printf("Result = %f", a);
    return 0;
}

A. Result = -100.000000
B. Result = -25.000000
C. Result = 0.000000
D. Result = 100.000000

3. 

What will be the output of the program?

#include<stdio.h>
#define JOIN(s1, s2) printf("%s=%s %s=%s \n", #s1, s1, #s2, s2);
int main()
{
    char *str1="India";
    char *str2="Max";
    JOIN(str1, str2);
    return 0;
}

A. str1=IndiaMax str2=Max
B. str1=India str2=Max
C. str1=India str2=IndiaMax
D. Error: in macro substitution

4. 

What will be the output of the program?

#include<stdio.h>
#define SQR(x)(x*x)

int main()
{
    int a, b=3;
    a = SQR(b+2);
    printf("%d\n", a);
    return 0;
}

A. 25
B. 11
C. Error
D. Garbage value

5. 

What will be the output of the program?

#include<stdio.h>
#define CUBE(x) (x*x*x)

int main()
{
    int a, b=3;
    a = CUBE(b++);
    printf("%d, %d\n", a, b);
    return 0;
}

A. 9, 4
B. 27, 4
C. 27, 6
D. Error