GoConqr has a new look! Let us know what you think.

Quiz

GAME1001 Chapter 10

Liam Blake 15 questions

Take the quiz

This quiz has a time limit, so it opens in the usual player.

Questions in this quiz (15)

  1. 1Each variable in a program is stored at a ________ location that has an ____________.
    1. Aoperator, address
    2. Bhexadecimal, operator
    3. Cunique, pointer
    4. Dunique, address
    5. Epointer, address
  2. 2What is a pointer variable?
    1. Aa variable that holds an address
    2. Ba variable that holds a value
    3. Ca variable that holds a memory location
    4. Dprovide an alternate way to access memory properties
    5. Eprovide an alternate way to access memory directives
  3. 3What will this program do?
    int num = -23;
    cout << &num;
    1. Aprint the address in hexidecimal
    2. Bprint the address in a number
    3. Cprint the number
    4. Dnothing
    5. Ea condition that says (&& num)
  4. 4What is an indirection operator?
    1. Acan hold the address of an integer
    2. Bcan hold the address of a character
    3. Cthe spacing does not matter
    4. D*
    5. ENone of the above
  5. 5An _____ name is the starting _______ of the array
    1. Aarray, address
    2. Bprepocessor directive, address
    3. Carray, value
    4. Darray, pointer
    5. Epointer, array
  6. 6Array notation vals[i] is equivalent to the pointer notation ____________
    1. A*(vals + i)
    2. B(vals + i)
    3. C*(vals)
    4. D*
    5. Evals
  7. 7What will this statement print out?
    int vals[ ] = { 4, 7, 11, 16, 24 };
    int *valptr = vals;
    cout << *(valptr + 2)
    1. A11
    2. B4
    3. C7
    4. D16
    5. E0
  8. 8A pointer ___________ receives an address when a __________ is called.
    1. Aparameter, function
    2. Bsubscript, function
    3. Coperator, subscript
    4. Dparameter, element
    5. Eparameter, operator
  9. 9A constant pointer: the address in the pointer cannot be changed after the pointer is initialized.
    1. ATrue
    2. BFalse
  10. 10When will a pointer be 'dangling' ?
    1. AIf it contains the address of memory that has been freed by a call
    2. Bif no longer needed dynamic memory is not freed
    3. Cif the pointer was set to NULL or 0.
    4. DNone of the above
    5. EAll of the above

Information

Description
Intro to Programming - GAME1001 Quiz on GAME1001 Chapter 10, created by Liam Blake on 05/12/2018.
Language
English
Views
0
Tags
intro to programming - game1001
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?