Q.1

The following statement where T is true and F is false T&&T||F&&T

  • is true
  • is false
  • is wrong
  • not applicable in C language
  • None of the above
Q.2

An asterisk placed after a data type means .

  • array to
  • pointer to
  • address to
  • located to
Q.3

The instructions you enter into the computer are called the _____

  • edited code
  • machine code
  • object code
  • source code
Q.4

Which of the following will store the numberas a Float number?

  • counPop = (float) 3.2e5;
  • counPop = (float) 3.2e6;
  • counPop = (float) .32e5;
  • counPop = (float) .32e7;
  • counPop = (float) 3.2-e5;
Q.5

If you wanted to sort many large objects or structures, it would be most efficient to

  • place them in an array and sort the array
  • place pointers to them in an array and sort the array
  • place them in a linked list and sort the linked list
  • place references to them in an array and sort the array
Q.6

If you declare two objects as Customer firstCust, secondCust; which of the following must be true?

  • Each object will store a separate copy of any static member data
  • Each object will store a separate copy of any member functions
  • Each object will store a separate copy of any nonstatic data members
  • You cannot declare two objects of the same class
Q.7

The most efficient data type for a variable that stores the letter C is the _____ data type

  • Character
  • Double
  • Float
  • Long Integer
  • Short Integer
Q.8

The program can access the private members of a class

  • directly
  • only through other private members of the class
  • only through other public members of the class
  • None of the above - the program cannot access the private members of a class in any way
Q.9

An object is _____

  • a category of classes
  • a name given to a class
  • an instance of a class
  • the same as a class
Q.10

Machine code is _____

  • edited code
  • source code
  • the 0s and 1s that the computer can understand
  • both (b) and (c)
Q.11

Which of the following are void functions?

  • main
  • pow
  • sqrt
  • All of the above
Q.12

Declaring variables is advantageous because it

  • avoids errors from misspelled variable names {b) helps the linker work efficiently
  • simplifies the writing of very short programs
  • All of the above
  • None of the above
Q.13

You invoke a function with a function

  • call
  • declaration
  • definition
  • prototype
Q.14

_____ refers to the process of locating and removing the errors in a program

  • Analyzing
  • Correcting
  • Debugging
  • Executing
  • Tracking
Q.15

When a program calls a function that has default parameters, if you omit an argument, you must _____

  • not omit any other arguments
  • omit all arguments
  • omit all arguments to the right of that argument
  • omit all arguments to the left of that argument
Q.16

Access specifiers are followed by

  • a comma
  • a semicolon
  • a colon
  • two colons
Q.17

# directives must be present

  • before the main() function
  • after the main() function
  • at the end of the program
  • anywhere in the program body
  • None of the above
Q.18

If the description of function is "input the quantity, validate that the quantity is greater thansubtract 1 from the quantity, and print the quantity," the function is

  • sequentially cohesive
  • logically cohesive
  • communicationally cohesive
  • functionally cohesive
Q.19

You have assigned the address of Value to the pointer P, Which statement will display the value stored in Value?

  • cout<<P;
  • cout<<*Value;
  • cout<<&P;
  • cout<<*P;
Q.20

The statement int n[= {-105};

  • assigns the value -13 to [2]
  • assigns the value 17 to n[2]
  • is wrong; it gives an error message
  • assigns the value 18 to n[2]
Q.21

A default constructor

  • takes no arguments
  • has default values for all its arguments
  • either (a) or (b)
  • neither (a) nor (b)
Q.22

A class D can be derived from a class C, which is derived from a class B, which is derived from a class A

  • True
  • False
Q.23

An unsigned double type of data

  • can have only positive values
  • does not exist
  • is always less than 1010
  • can have only negative values
  • None of the above
Q.24

Which of the following statements declares a variable that can contain a decimal number?

  • dec payRate;
  • dec hourlyPay
  • float payRate
  • float hourlyPay;
  • None of the above
Q.25

The arguments that determine the state of the cout object are called

  • classes
  • manipulators
  • format flags or state flags
  • state controllers
Q.26

A function that is prototyped as double calculate(int num); may ______

  • receive a double constant such as 3.9
  • receive a double variable
  • either (a) or (b)
  • neither (a) nor (b)
Q.27

Two access specifers in C++ are

  • public and private
  • int and double
  • formal and informal
  • void and free
Q.28

The contents of two pointers that point to adjacent of type float differ by

  • one bytes
  • two bytes
  • three bytes
  • four bytes
Q.29

Hiding individual components of an entry is _____

  • polymorphism
  • encapsulation
  • scaling
  • not recommended in C++
Q.30

The generic name used for unexpected errors that occur during the execution of a program is

  • infractions
  • exceptions
  • deviations
  • anomalies
Q.31

Which is a good guideline for creating function names?

  • Use all lowercase letters to identify the functions as C++ functions
  • Use long names to reduce the likelihood of creating a duplicate function name
  • Use abbreviations as much as possible to save both keystrokes and memory
  • Avoid the use of digits because they are easily confused with letters
Q.32

The main difference in operation between an 'if statement and a 'while' statement is

  • the 'while' loop body is executed
  • the body of the 'while' statement may be executed many times, the body of the 'if statements only once
  • the conditional expression following the keyboard is evaluated differently
  • All of the above
  • None of the above
Q.33

Two or more arrays whose elements are related by their position (subscript) in the arrays are called _____ arrays

  • horizontal
  • paired
  • parallel
  • related
  • vertical
Q.34

Static variables are sometimes called

  • class variables
  • functional variables
  • dynamic variables
  • auto variables
Q.35

Each generic type in a template function definition is preceded by the keyword _________

  • template
  • function
  • type
  • class
Q.36

The standard output stream, which refers to the computer screen, is called

  • cin
  • cout
  • stin
  • stout
  • None of the above
Q.37

When a multidimensional array is accessed, each array index is

  • separated by commas
  • surrounded by brackets and separated by commas
  • separated by commas and surrounded by brackets
  • surrounded by brackets
Q.38

The expression c = i++ causes

  • the value of i assigned to c and then i incremented by 1
  • i to be incremented by 1 and then the value of i assigned to c
  • value of i assigned to c
  • i to be incremented by 1
  • None of the above
Q.39

Elements in an array are identified by a unique _____

  • data type
  • order
  • subscript
  • symbol
Q.40

Programmers prefer to declare almost all variables _____

  • at the beginning of each function
  • globally
  • on one line
  • with cryptic names
Q.41

A function that changes an object's state belongs to the category of

  • inspector functions
  • mutator functions
  • auxiliary functions
  • manager functions
Q.42

A constructor initialization list is preceded by

  • a. semicolon
  • a colon
  • two colons
  • a space
Q.43

Which of the following will increase the value stored in the first element of the fee array by 2?

  • amount[0] = amount[0] + 2;
  • amount, fee[0] = amount, fee [0] + 2;
  • feelnfo.amount[0] = feelnfo.amount[0] + 2;
  • fee[0].amount = fee[0].amount + 2;
  • fee.amount[0] = fee.amount[0] + 2;
Q.44

To use the strcpy function, you must include the _____ header file in your program

  • assign.h
  • copy.h
  • string.h
  • strcopy.h
  • strcpy.h
Q.45

The extraction operator >> is a(n) _____

  • overloaded function
  • C++ class
  • C++ object
  • static reference variables
Q.46

The statement int num[2][3]={ {1,2}, {3,4}, {};

  • assigns a value 2 to num[1][2]
  • assigns a value 4 to num[1][2]
  • gives an error message
  • assigns a value 3 to num[1][2]
Q.47

Which of the following statements creates and initializes a pointer named salesPtr?

  • salesPtr = NULL;
  • *salesPtr = "";
  • float &salesPtr = NULL;
  • float *salesPtr = "";
  • float *salesPtr = NULL;
Q.48

If a class will serve as a base class, most often the base class data members are

  • private
  • protected
  • public
  • polymorphic
Q.49

The printer can be accessed using the predefined filename _____

  • printer file
  • print
  • cout
  • PRN, LPT1, etc
Q.50

You add the desired type to a specific template class instantiation by placing the type's name ______

  • between angle brackets
  • in parentheses
  • on a line by itself
  • immediately prior to the class name
0 h : 0 m : 1 s