Question: Explain the codes in each line (120-129) please. Pointer Lab in C * 113 * * 107 * Return the size of a double in

Explain the codes in each line (120-129) please. Pointer Lab in CExplain the codes in each line (120-129) please. Pointer Lab in C

* 113 * * 107 * Return the size of a double in bytes. 108 109 * ALLOWED: 110 Pointer operators: *, & 111 * Binary integer operators: -, +, * 112 Unary integer operators: ! Shorthand operators based on the above: ex. +, *=, ++, --, etc. 114 115 * DISALLOWED: 116 * Pointer operators: [] (Array Indexing Operator) 117 * Binary integer operators: &, &&, l, ll, , >, ==, !=, ^, 1, % 118 Unary integer operators: ~, 119 */ 120 int doubleSize() { 121 double doubArray[10]; 122 double * doubPtr1; 123 double * doubPtr2; 124 // Write code to compute size of a double. 125 126 doubPtr1 = doubArray; 127 doubPtr2 = doubPtrl + 1; I 128 129 return (char *) doubPtr2 - (char *) doubPtr1; 130 }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!