Question: C language module c-1 (1.11) Write the program and then copy paste the output please. int main O int AC10]; int *B; printf CBEFORE malloc:
C language
module c-1 (1.11) Write the program and then copy paste the output please.

int main O int AC10]; int *B; printf C"BEFORE malloc: Address A-%p Address B-%p ", A, B); // Prints an address for A, but zero for B // Assign space to B B- (int*) malloc (sizeof(int) * 10); printf C"AFTER malloc: Address A-p Address B-%p ", A, B); 17 Prints an address for A and newly allocated address for B // Two ways of assigning values: *CA 4)6; printf C"AL3]-%d AL4]-%d ", A3], A[4);// Prints 5 and 6 // Two ways of assigning values: *(B 4)-8 printf ("[3]-Xd B 4]-XdNn", [3], [4]); // Prints 7 and 8. //Done free (B); HW Exercise 1.11: Implement the above program in pointerArith.c. Record its output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
