Page 1 of 1

Determine the output produced by the following C code. You may assume that sizeof(int) is 4. int a [4]; int *ip; char *c

Posted: Fri May 20, 2022 1:32 pm
by answerhappygod
Determine The Output Produced By The Following C Code You May Assume That Sizeof Int Is 4 Int A 4 Int Ip Char C 1
Determine The Output Produced By The Following C Code You May Assume That Sizeof Int Is 4 Int A 4 Int Ip Char C 1 (37.8 KiB) Viewed 26 times
Determine the output produced by the following C code. You may assume that sizeof(int) is 4. int a [4]; int *ip; char *cp; ip = a + 1; ср (char *) ip; for (int i 0; i < 4; i++) a 10 + i; printf("%d %d %d %d\n", a[0], a[1], a[2], a [3]); ip[0] = 99; printf("%d %d %d %d\n", a[0], a[1], a[2], a[3]); *(ip+ 1) 999; ip = (int *) (cp + 8); *ip = 9999; printf("%d %d %d %d\n", a[0], a [1], a[2], a[3]); = =