Pointer a contains the address of pointer b which contains the address of the integer c. Which of the following expression assigns the value 30 to the integer c?
a
b
c
*a = 30
**a = 30
***a = 30
The assignment cannot be done
Consider the following code fragment:
struct data { int *ptr; int num; } a; a.ptr = &(a.num);
Which of the following expressions assigns the value 10 to the “num” field of the “a” structure?
num
*(a.ptr) = 10
a.ptr = 10
a.*ptr = 10
a.ptr = *10
The assignment cannot be done using only the “ptr” field.
ptr