1 votes 1 votes #include<stdio.h> main() { char *p = 0; *p = 'a'; printf("value in pointer p is %c\n",*p); } What is the output of this code ? Why? Programming in C programming-in-c + – Raj Kumar 7 asked Mar 30, 2018 • edited Mar 30, 2018 by Sukanya Das Raj Kumar 7 387 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes You have created a pointer that is pointing to random memory address and you assigning it a value which is problem(error). You should first point to some valid known location then assign values. Tarun kushwaha 1 answered Mar 30, 2018 Tarun kushwaha 1 comment Share Follow See all 0 reply Please log in or register to add a comment.