What will be the output of the following C code? [code] #include <stdio.h> void main() { char *a[10] = {"hi", "hello",

What will be the output of the following C code?
Code:
    #include <stdio.h>
    void main()
    {
        char *a[10] = {"hi", "hello", "how"};
        int i = 0;
        for (i = 0;i < 10; i++)
        printf("%s", *(a[i]));
    }
A. segmentation fault
B. hi hello how followed by 7 null values
C. 10 null values
D. depends on compiler
 

Tìm kiếm

Back
Top