Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
void f(char *k)
{
    k++;
    k[2] = 'm';
    printf("%c\n", *k);
}
void main()
{
    char s[] = "hello";
    f(s);
}

A. l

B. e

C. h

D. o

Answer: Option B


This Question Belongs to C Program >> Pointer

Join The Discussion

Related Questions on Pointer