-
Comment on the output of the following C code.
#include <stdio.h>
int main()
{
char *s = "Interveiw" //Line 1
char *p = "Mania\n"; //Line 2
s = p; //Line 3
printf("%s, %s\n", s, p); //Line 4
}
-
- Output will be Interveiw, Mania
- You cannot assign pointer like in Line 3
- Memory holding “this” is cleared at line 3
- Memory holding “this” loses its reference at line 3
- None of these
Correct Option: D
Memory holding “this” loses its reference at line 3