Answer :
The following statements apply: a. p1 points to i So correct answer is A
e. p2 points to k f. p2 is equal to 80.Memories are like boxes where you can store data and then keep it to use whenever you need it. We use pointers in C++ to point to memory addresses, which makes accessing and manipulating data easier. In the memory diagram for the given program, we have to depict the values of the variables i, k, p1, and p2. The following code is given: ```int i = 42; int k = 80; int* p1; int* p2; pl = &i; p2 = &k;```The given code assigns values to the variables i, k, p1, and p2. `&` is the address-of operator, which means that it returns the memory address of its operand. The memory diagram for the given code is as follows:p1 points to i.e., &i. p2 points to k, i.e., &k. Therefore, the correct statements are:a. p1 points to ib. p1 is equal to 42 (incorrect)c. p2 points to id. p1 is equal to 80 (incorrect)e. p2 points to kf. p2 is equal to 80g. p1 points to k (incorrect)h. p2 is equal to 42 (incorrect)
To know more about points visit:
brainly.com/question/32548065
#SPJ11