Question: Please explain each line from 95 to 103. Its Pointer Lab in C 78 79 * STEP 2: Modify the following functions according the coding
Please explain each line from 95 to 103.
Its Pointer Lab in C
78 79 * STEP 2: Modify the following functions according the coding rules. 80 81 82 /* * Return the size of an integer in bytes. * 83 84 85 86 * ALLOWED: * Pointer operators: *, & Binary integer operators: -, +, * Unary integer operators: ! Shorthand operators based on the above: ex. +=, *=, ++,--, eFDIStc. ** 87 88 89 ** * * * 90 * DISALLOWED: 91 Pointer operators: [] (Array Indexing Operator) 92 Binary integer operators: &, &&, l, ll, , >, ==, !-, ^, /, % 93 Unary integer operators: ~, 94 */ 95 int intSize() { 96 int intArray(10); 97 int * intPtri; 98 int * intPtr2; 99 // Write code to compute size of an integer. I 100 intPtr1 = intArray; 101 intPtr2= intPtr1+1; 102 103 return (char *) intPtr2 - (char *) intPtr1; 104 } 105
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
