Q:

Assume the output of the following code:

0

Assume the output of the following code:

 #include <stdio.h>
    void main()
    {
        char *a[10] = {"hi", "hello", "how"};
        int i = 0, j = 0;
        a[0] = "hey";
        for (i = 0;i < 10; i++)
        printf("%s\n", a[i]);
    }

  1. hey hello how Segmentation fault
  2. hi hello how Segmentation fault
  3. hi hello how followed by 7 null values
  4. Compilation error

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

hey hello how Segmentation fault

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now
Can we combine the two statements... >>
<< Which of the following are correct syntaxes to sen...