****

Hey guys, I really need help on this. I just submitted my exam but I won't get feedback till next week.
I'm hoping that you guys can help me review. Thanks!

Question 1  
For each non-static data member of a class, C++ allocates only one memory space.
Question 1 options:
    True
    False

Question 2  
C++ classes were specifically designed to handle ADTs.
Question 2 options:
    True
    False

Question 3 
Data abstraction is defined as a process of separating the logical properties of the data from its implementation.
Question 3 options:
    True
    False

Question 4  
Class objects can be passed as parameters to functions and returned as function values.
Question 4 options:
    True
    False

Question 5  
The file that contains the specification details is called the ____ file.
Question 5 options:
    source
    header
    main
    implementation

Question 6  
The components of a class are called the ____ of the class.
Question 6 options:
    variables
    functions
    members
    elements

Question 7 
By default, all members of a class are ____.
Question 7 options:
    static
    protected
    public
    private

Question 8 
Defining a struct is the same as declaring a struct variable in a C++ program.
Question 8 options:
    True
    False

Question 9  
When declaring an array of structs, you must define the struct type before the array.
Question 9 options:
    True
    False

Question 10  
Assume that x and y are arrays. Which of the following statements is a legal C++ statement?
Question 10 options:
    cout << x;
    y = x;
    cin >> y;
    x[0] = y[1];

Question 11  
When you pass an array as a parameter, the base address of the actual array is passed to the formal parameter.
Question 11 options:
    True
    False

Question 12  
All character arrays are C-strings.
Question 12 options:
    True
    False

Question 13 
The following statement: int *p; declares p to be a(n) ____.
Question 13 options:
    pointer
    num
    int
    address

Question 14 
The operator that returns the address of its operand is called the ____ operator.
Question 14 options:
    address of
    dereferencing
    indirection
    pointer

Question 15  
The C++ operator ____ is used to destroy dynamic variables.
Question 15 options:
    delete
    new
    dereference
    address of

Question 16  
Assume we have the following statement:  Which statement deletes the array?
Question 16 options:
    delete [] first;
    delete first;
    delete first [];
    delete first[10];

Question 17  
The statement: delete p; deallocates the memory referenced by the pointer p.
Question 17 options:
    True
    False
Save
Question 18 (10 points) 
An array name is a dynamic pointer.
Question 18 options:
    True
    False

Question 19 
Given the declaration int *a;, the statement a = new int [50]; dynamically allocates an array of 50 components of the type _____.
Question 19 options:
    int
    int*
    pointer
    address

Question 20 
Which of the following arithmetic operations is allowed on pointer variables?
Question 20 options:
    Increment
    Modulus
    Multiplication
    Division

The default member-wise initialization is due to the constructor, called the _____ constructor.
Question 21 options:
    init
    new
    copy
    pointer

Question 22 
Every node in a linked list has two components: one to store the relevant information (data), and one to store the address, called the ____.
Question 22 options:
    location
    link
    head
    back

Question 23 
You can use the pointer head to traverse the list.
Question 23 options:
    True
    False

Question 24  
A doubly linked list can be traversed in either direction.
Question 24 options:
    True
    False

Question 25 
The ____ case stops the recursion.
Question 25 options:
    head
    tail
    general
    base

Question 26
A recursive function executes more slowly than its iterative counterpart.
Question 26 options:
    True
    False

Question 27  
The link field of the last node of the linked list is _____.
Question 27 options:
    NULL
    0
    n-1
    n

Question 28 
Every node in a singly linked list contains _____.
Question 28 options:
    the next node
    no address information
    the address of the next node
    the address of the previous node

Question 29 
A _____ sign in front of a member name on the UML diagram indicates that this member is a public member.
Question 29 options:
    +
    -
    #
    $

Question 30 
If a variable is passed by _____, the formal parameter receives only the address of the actual parameter.
Question 30 options:
    reference
    value
    index
    constant
****

Google is your friend. The first C++ test I took looked like this, but my professor didn't tteach half the stuff. He expected us to read it from the book on our own. Answer what you can and google the rest.

Hi numbplumb,

Please don't mix code and your question, really difficult to see. Anyhow, seems like the questions are easy enough. Have you looked at www.cprogramming.com? I'm sure some of your question has been answered in this forum too.

You tell us how you answered the questions then we will tell you if you are right or not, and if not we will tell you the correct answer.

Well, if you already submitted your exam answers, then what can we do to help you? Isn't it a bit late? :rolleyes:

FWIW, we don't do your homework, OR exams for you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.