6. 

What will be the output of the program If characters 'a', 'b' and 'c' enter are supplied as input?

#include<stdio.h>

int main()
{
    void fun();
    fun();
    printf("\n");
    return 0;
}
void fun()
{
    char c;
    if((c = getchar())!= '\n')
        fun();
    printf("%c", c);
}

A. abc abc
B. bca
C. Infinite loop
D. cba

7. 

What will be the output of the program ?

#include<stdio.h>

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

A. Error
B. IndiaMax
C. Cannot predict
D. None of above

8. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    printf("India", "Max\n");
    return 0;
}

A. Error
B. India Max
C. India
D. Max

9. 

What will be the output of the program ?

#include<stdio.h>

int main()
{
    char *names[] = { "Suresh", "Siva", "Sona", "Baiju", "Ritu"};
    int i;
    char *t;
    t = names[3];
    names[3] = names[4];
    names[4] = t;
    for(i=0; i<=4; i++)
        printf("%s,", names[i]);
    return 0;
}

A. Suresh, Siva, Sona, Baiju, Ritu
B. Suresh, Siva, Sona, Ritu, Baiju
C. Suresh, Siva, Baiju, Sona, Ritu
D. Suresh, Siva, Ritu, Sona, Baiju

10. 

What will be the output of the program ?

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

int main()
{
    char str[] = "India\0\Max\0";
    printf("%d\n", strlen(str));
    return 0;
}

A. 10
B. 6
C. 5
D. 11