5.0010.
Given the following sections of C code:
struct emp
{ char lname[7],
dept[5];
short age, class;
float salary;
};
void main()
{
struct emp employee[6];
printf (“%lu\n”, &employee[2].class); // The output
would be 6420
If the following code were part of the
above program:
int i;
struct
emp *rec = employee;
FORGET THE ANSWERS YOU
OBTAINED FOR Parts a and b.
Suppose that after the above
the statement printf(“%lu”, &employee[0]);
yielded the output 7500.
Now, inside the program we
find the code:
for (i = 0; i < 3; i++)
rec++;
e. How many
bytes of contiguous storage are required to store the variable rec?
ALL pointers, regardless of the type of data they
point to, require 4-bytes of storage