- 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 24 times
Determine the output produced by the following C code. You may assume that sizeof(int) is 4. int a [4]; int *ip; char *c
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Determine the output produced by the following C code. You may assume that sizeof(int) is 4. int a [4]; int *ip; char *c
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]); = =