1.

What will be the output of the following C code?
 #include <stdio.h>
void main()
{
char *str= "WELCOME";
char *ptr = str;
printf("%c %c", *(ptr + 2), str[0]);
}

A. WELCOME
B. Compilation Error
C. L W
D. W L
E. None of these
Answer» D. W L


Discussion

No Comment Found