16. 

What will be the output of the program?

#include<stdio.h>

int main()
{
    int arr[3] = {2, 3, 4};
    char *p;
    p = arr;
    p = (char*)((int*)(p));
    printf("%d, ", *p);
    p = (int*)(p+1);
    printf("%d", *p);
    return 0;
}

A. 2, 3
B. 2, 0
C. 2, Garbage value
D. 0, 0

17. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char *str;
    str = "%d\n";
    str++;
    str++;
    printf(str-2, 300);
    return 0;
}

A. No output
B. 30
C. 3
D. 300

18. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    printf("%c\n", 7["IndiaMax"]);
    return 0;
}

A. Error: in printf
B. Nothing will print
C. print "X" of IndiaMax
D. print "7"

19. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char str[] = "peace";
    char *s = str;
    printf("%s\n", s++ +3);
    return 0;
}

A. peace
B. eace
C. ace
D. ce

20. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char *p;
    p="hello";
    printf("%s\n", *&*&p);
    return 0;
}

A. llo
B. hello
C. ello
D. h