Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MULTIPLE CHOICE also known as the address operator, returns the memory address o

ID: 3593435 • Letter: M

Question







MULTIPLE CHOICE also known as the address operator, returns the memory address of a The variable.. a. asterisk ( . ) e. percent sign () d. exclamation point () e. None of these manipulate data stored in other variables. 2. With pointer variables, you can b. seldom indirectly d. All of these e. None of these 3. The statement int 'ptr: has the same meaning as a. int ptr b. *int ptr c. int ptr* d. int ptr e. None of these 4. When you work with a dereferenced pointer, you are actually working with: a. a variable whose memory has been deallocated b. a copy of the value pointed to by the pointer variable the actual value of the variable whose address is stored in the pointer variable All of these None of these c. d. e. These can be used as pointers. a. Array names b. Numeric constants c. Punctuation marks d. All of these e. None of these 5. The contents of pointer variables may be changed with mathematical statements that perform: a. all mathematical operations that are legal in C++ b. multiplication and division c. addition and subtraction d. b and c 6.

Explanation / Answer

2.-(c)indirectly

pointer variable is also called as pointer. they are design to hold memory address of any variable. therefore we can use pointer variable to indirectly manipulate data stored in the memory address holds by pointer.

int *ptr;

the asterix (*)shows that ptr is a pointer variable and int data typr indicates that pointer variable will holds the memory address of an integer variable

4.-(c) the actual value of the variable whose address is stored in the pointer variable

when pointer is use with the asterix(*) sign is called dereferencing pointer.  dereferencing pointer tell the computer what is stored where the pointer is pointing to where as without dereferencing a pointer only tell the computer "where" the variable is stored. dereferencing pointer directly effects the value of the a variable it points to.

6.-(c) the actual value of the variable whose address is stored in the pointer variable

using addition and substraction operation we can add the size of one integer to a pointer pointing an array, so in that case if memory address is change it will point to the next element in the array similary in the substration the size one integer decreses from the pointer .

8.-(d) declares a pointer variable name num2

double is a data type use to store double precision floating point value. num2 is a variable name. asterix (*) is a symbol denote to pointer and (*) clearly shows that it is a pointer variable. therefore it ia a declaration of a pointer variable name num2.

10.(c)assigns the dereferenced pointer's value, then increments the pointer's address

as it shows that * array is a dereferenced pointer and ++ is use to increment the pointer address which is added and assigned to a variable sum.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote