Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void fun(char *p)
    {
    p++;
    p[3] = 'N';
    printf("%c\n", *p);
    }
    void main()
    {
    char s[] = "WELCOME";
    fun(s);
    }
    1. WELCOME
    2. N
    3. E
    4. Garbage value
    5. None of these
Correct Option: C

E



Your comments will be displayed only after manual approval.