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

The symbol is the dereferencing operator. The symbol means \" address of.\" The

ID: 3930219 • Letter: T

Question

The symbol is the dereferencing operator. The symbol means " address of." The name of an array, without any brackets, acts as a(n) to the starting address of the array. An operator that allocates a dynamic variable is An operator that deallocates a dynamic variable is Parameters that are passed by are similar to a pointer variable in that they can contain the address of another variable. The are used as parameters of a procedure (void function) whenever we want a procedure to change the value of the argument. Given the following information, fill the blanks with either " an address" or "3.75". float * pointer; float pay = 3.75; pointer = &pay; cout

Explanation / Answer

1.   The * symbol us the dereferencing operator.
   •   It is unary * operator used in the case of pointers
   •   It is also called as indirection operator. It uses the pointer variable for the know about location value that points in the memory.

2.   The & symbol means “address of”.

   •   It is & is an address operator.
   •   It returns the memory address of the variable.  
   •   These address operators known as pointers.

3.   The name of an array, without any brackets ,acts as a(n) pointer to the starting address of the array.
   •   Pointer variable which can store the address of another variable.

4.   An operator that allocates a dynamic variable is new
   •   This new operator will be used to allocate memory dynamically.
   •   Memory allocation for any data type is possible with new operator.
   •   Like built in operators double ,integer and so on.

5.   An operator that deallocates a dynamic variable is delete
   •   This delete operator will be used to deallocate memory dynamically.
   •   Deallocation means the clean up of the space used for the variable.


6.   Parameter that are passed by addresses are similar to a pointer variable in that they can contain the address of another variable. They are used as parameters of a procedure(void function) whenever we want a procedure to change the value of the argument.
   •   Parameters with address operators are passed to function that is called pointers.
   •   Pointers which can store the address of the other variable.


float *pointer;

float pay = 3.75;

pointer = &pay;

7.   cout <<pointer ; will print 0x7fffb4853014 (address of pointer variable)

   •   it will display the address of the variable.


8.   cout << *pointer; will print 3.75

   •   It will print the value of the pointer variable.
   •   Assign the pay value with address operator(&) to pointer variable.
   •   That means accessing with * unary operator of the pointer variable it will display the value.

9.   cout<< &pay; will print 0x7fff20a35e74sh-4.2
   •   it will display the address of the pay variable type of float.

10.   cout << pay; will print 3.75
   •   it will display the value of the variable type of pointer

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