C Programming - C Preprocessor

1.
Point out the error in the program
#include<stdio.h>
#define SI(p, n, r) float si; si=p*n*r/100;
int main()
{
    float p=2500, r=3.5;
    int n=3;
    SI(p, n, r);
    SI(1500, 2, 2.5);
    return 0;
}
26250.00 7500.00
Nothing will print
Error: Multiple declaration of si
Garbage values
Answer: Option
Explanation:

The macro #define SI(p, n, r) float si; si=p*n*r/100; contains the error. To remove this error, we have to modify this macro to

#define SI(p,n,r) p*n*r/100


2.
Point out the error in the program
#include<stdio.h>

int main()
{
    int i;
    #if A
        printf("Enter any number:");
        scanf("%d", &i);
    #elif B
        printf("The number is odd");
    return 0;
}
Error: unexpected end of file because there is no matching #endif
The number is odd
Garbage values
None of above
Answer: Option
Explanation:

The conditional macro #if must have an #endif. In this program there is no #endif statement written.