21. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char str[25] = "IndiaMax";
    printf("%s\n", &str+2);
    return 0;
}

A. Garbage value
B. Error
C. No output
D. diaMax

22. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char str = "IndiaMax";
    printf("%s\n", str);
    return 0;
}

A. Error
B. IndiaMax
C. Base address of str
D. No output

23. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char str[] = "Nagpur";
    str[0]='K';
    printf("%s, ", str);
    str = "Kanpur";
    printf("%s", str+1);
    return 0;
}

A. Kagpur, Kanpur
B. Nagpur, Kanpur
C. Kagpur, anpur
D. Error

24. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    printf(5+"IndiaMax\n");
    return 0;
}

A. Error
B. IndiaMax
C. Max
D. None of above

25. 

What will be the output of the program ?

#include<stdio.h>
#include<string.h>

int main()
{
    char sentence[80];
    int i;
    printf("Enter a line of text\n");
    gets(sentence);
    for(i=strlen(sentence)-1; i >=0; i--)
        putchar(sentence[i]);
    return 0;
}

A. The sentence will get printed in same order as it entered
B. The sentence will get printed in reverse order
C. Half of the sentence will get printed
D. None of above