Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2015 | Question 71

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 05 Apr, 2018
Improve Article
Save Article

Consider the following declaration:

int a, *b=&a, **c=&b;

The following program fragment


(A) does not change the value of a
(B) assigns address of c to a
(C) assigns the value of b to a
(D) assigns 5 to a

Answer: (D)

Explanation: *b=&a // b holds the address of a
**c=&b // c holds the address of b
and a=4

**c = *(&b) means the value at the address of b which is equal to a.
**c = 5 // a is modified to 5
So, option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!