Question: In the following code, the first printf) reached produces the output 14, but the second printf) can cause a bus error or a segmentation fault.

In the following code, the first printf) reached produces the output "14," but the second printf) can cause a bus error or a segmentation fault. Why? 4. main() int *p; funct(p); printf ( "%d " , *p) ; funct(int *p2) p2 (int *)malloc(4); *p2-14; printf ( "%d ", *p2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
