C Code Test Online Practice - Set 06 - ObjectiveBooks

C Code Test Online Practice - Set 06

Practice Test: Question Set - 06

1. A class named Student must have a constructor whose name is
    (A) Student
    (B) ~Student
    (C) Constructor
    (D) Any legal C++ name

2. To execute a C++ program, you first need to translate the source code into object code. This process is called
    (A) Coding
    (B) Compiling
    (C) Sourcing
    (D) Translating

3. Assume that a program contains a programmer-defined void function. When C++ encounters the function's closing brace (}), C++ returns to the statement ________
    (A) Immediately above the statement that called the function
    (B) That called the function
    (C) Immediately below the statement that called the function
    (D) None of these

4. To use the strcpy function, you must include the ________ header file in your program
    (A) assign.h
    (B) copy.h
    (C) string.h
    (D) strcopy.h

5. External documentation includes
    (A) A printout of the program's code
    (B) Flowcharts
    (C) IPO charts
    (D) Pseudo code

6. You declare a function with a function _______, which is typically entered at the beginning of the program, below the #include directives
    (A) Call
    (B) Prototype declaration
    (C) Definition
    (D) Pointer

7. Which of the following is(are) valid identifier(s)?
    (A) record_1
    (B) 1 record
    (C) return
    (D) $tax

8. The C++ operator used to allocate memory is _______
    (A) Mem
    (B) Allocate
    (C) New
    (D) Create

9. When a variable exists or is accessible, it is said to be ________
    (A) Immediate
    (B) In the path
    (C) Available
    (D) In scope

10. A variable declared in a function is called a(n) _______ variable
    (A) Area
    (B) Global
    (C) Local
    (D) Reference

11. Any output manipulator function you create _______
    (A) Should take as an argument an instance of ostream as a reference
    (B) Should return void
    (C) Must be a member function of the ostream class
    (D) Must inherit ostream

12. The two statements that can be used to change the flow of control are
    (A) if and switch
    (B) if and while
    (C) switch and do-while
    (D) break and continue

13. The indirection operator is the
    (A) Asterisk
    (B) Ampersand
    (C) Dollar sign
    (D) Plus sign

14. Which is a good reason for passing a variable's address to a function?
    (A) The function will have a copy of the variable
    (B) The function cannot change the value of the variable in the calling function
    (C) C++ requires that all variables used in a function be passed by address
    (D) The called function can change the value of the variable in the calling function

15. The feature that allows you to use the same function name for separate functions that have different argument lists is called _______
    (A) Overriding
    (B) Overloading
    (C) Constructing
    (D) Destructing

Show and hide multiple DIV using JavaScript View All Answers

 Next Tests:

    Blogger Comment
    Facebook Comment