Please explain this question void main() {int a =300; char *ptr = (char*) &a ; ptr ++; *ptr =2; printf("%d", a); }

icon
Related questions
Question
Please explain this question
void main()
{int a =300;
char *ptr = (char*) &a ;
ptr ++;
*ptr =2;
printf("%d", a);
}
Transcribed Image Text:Please explain this question void main() {int a =300; char *ptr = (char*) &a ; ptr ++; *ptr =2; printf("%d", a); }
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer