Explore topic-wise MCQs in Engineering.

This section includes 4320 Mcqs, each offering curated multiple-choice questions to sharpen your Engineering knowledge and support exam preparation. Choose a topic below to get started.

4201.

To create and execute a C++ program, you need to have access to

A. a C++ compiler
B. a C++ translator
C. an object code editor
D. a text editor
E. both (a) and (d)
Answer» F.
4202.

If you omit any constructor argument when you instantiate an object, you must use default values______

A. for all parameters to the constructor
B. for all parameters to the right of the argument
C. for all parameters to the left of the argument
D. for no other parameters
Answer» C. for all parameters to the left of the argument
4203.

An auxiliary function _____

A. return information about data members
B. changes the state of data members
C. performs an action or service
D. creates and destroys objects
Answer» D. creates and destroys objects
4204.

Many programmers separate a class into two files: _____

A. one for the declarations and one for the implementations
B. one for the void functions and one for the other functions
C. one for the public data and one for the private data
D. one for the primary functions and one for the auxiliary functions
Answer» B. one for the void functions and one for the other functions
4205.

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
Answer» C. constructing
4206.

Which of the following are valid characters constants?

A. ' n'
B. ' '
C. ' 0'
D. All of the above
E. None of the above
Answer» E. None of the above
4207.

A function can

A. return a value
B. perform a task
C. change value of actual arguments in call by reference
D. a, b, c above are all true
E. None of the above
Answer» E. None of the above
4208.

The most common operation used in constructors is _____

A. addition
B. overloading
C. assignment
D. polymorphism
Answer» D. polymorphism
4209.

The C++ expression p --> val means the same thing as

A. *p.val
B. *(p.val)
C. (*p).vai
D. p.val
Answer» D. p.val
4210.

The word case used in the switch statement represents a

A. function in the C++ language
B. data type in the C++ language
C. keyword in the C++ language
D. global variable in the C++ language
E. None of the above
Answer» D. global variable in the C++ language
4211.

If you omit any constructor argument when you instantiate an object, you must use default values

A. for all parameters to the constructor
B. for all parameters to the right of the argument
C. for all parameters to the left of the argument
D. for no other parameters
Answer» C. for all parameters to the left of the argument
4212.

Which of the following tells C++ to display numbers with zero decimal places?

A. setiosflags(0)
B. setiosflags(zero)
C. setprecision(0)
D. setprecision(zero)
Answer» D. setprecision(zero)
4213.

Code that has already been tested is said to be _____

A. inherited
B. reusable
C. reliable
D. polymorphic
Answer» D. polymorphic
4214.

_____ variables are declared outside of any statement block

A. Area
B. Global
C. Local
D. Reference
E. Value
Answer» C. Local
4215.

The end of string is recognized by

A. the null character
B. the newline character
C. the $ sign
D. the / sign
E. None of the above
Answer» B. the newline character
4216.

Variable names known only to the procedure in which they are declared are ________

A. local
B. global
C. recent
D. internal
Answer» B. global
4217.

Whis is true?

A. A derived class may have more than one base class
B. A base class may have more than one derived class
C. both (a) and (b)
D. neither (a) nor (b)
Answer» D. neither (a) nor (b)
4218.

The keyword used to define a structure is

A. stru
B. stt
C. struct
D. unlimited
Answer» D. unlimited
4219.

The outline or the definition of a function is called its

A. beta test
B. forerunner
C. outline
D. prototype
Answer» E.
4220.

Which of the following is false?

A. Data stored in an array can be accessed faster than data stored in a disk file
B. Data stored in an array needs to be entered only once, typically at the beginning of the program
C. Arrays allow the programmer to store information in the computer's internal memory
D. When using arrays, you will have fewer variable names to remember
E. None of the preceding statements are false
Answer» F.
4221.

A function stub typically contains

A. the function header
B. the function braces
C. the return statement, if it's value- returning function
D. a display message
E. All of the above
Answer» F.
4222.

A variable's _____ indicates which portions of the program can use the variable

A. area
B. extent
C. lifetime
D. reach
E. scope
Answer» F.
4223.

If an integer object is thrown with a throw statement, then a subsequent catch block has a usable match if the type of the catch argument is _____

A. const int &
B. int &
C. either (a) or (b)
D. neither (a) nor (b)
Answer» D. neither (a) nor (b)
4224.

To send output to a file, you need to include the _____ header file in your program

A. file.h
B. fstream.h
C. iomanip.h
D. iostream.h
E. of stream.h
Answer» C. iomanip.h
4225.

A C++ _____ is a program that runs in a DOS window

A. algorithm
B. cast application
C. console application
D. source application
Answer» D. source application
4226.

A difference, between reference variables and pointers is that

A. reference variables are easier to use
B. pointers are easier to use
C. reference variables are more flexible
D. no difference exists between reference variables and pointers
Answer» B. pointers are easier to use
4227.

A 'C function does not contain

A. a function header
B. argument declarations
C. other 'C' functions
D. function body
E. None of the above
Answer» D. function body
4228.

_____ variables remain in memory until the program ends

A. Area
B. Global
C. Local
D. Reference
E. Value
Answer» C. Local
4229.

The statement float values[]={3.14, -7.86, 36.96, 4.87};

A. assigns 36.96 to values[2]
B. assigns -7.86 to values[2]
C. gives an error message
D. assign 14 to values[2]
Answer» B. assigns -7.86 to values[2]
4230.

A constructor initialization list is preceded by _____

A. a semicolon
B. a colon
C. two colons
D. a space
Answer» C. two colons
4231.

When the compiler places a copy of a small function's statements directly into a program, the function is said to be _____

A. overloaded
B. mangled
C. inline
D. redundant
Answer» D. redundant
4232.

A group of related fields that contain all of the data about a specific person, place, or thing is called a

A. data file
B. field file
C. program file
D. record
Answer» E.
4233.

To create a template class, you begin with _________

A. the template definition
B. the keyword class
C. the function definitions
D. the keyword definition
Answer» B. the keyword class
4234.

Which of the following is a C++ object?

A. >>
B. read()
C. cin
D. iostream
Answer» D. iostream
4235.

When a function performs tasks based on a decision, it has _____

A. functional cohesion
B. coincidental cohesion
C. logical cohesion
D. no cohesion
Answer» D. no cohesion
4236.

A variable is _____

A. an item of data
B. a memory location whose value can change while the program is running
C. a memory location whose value cannot change while the program is running
Answer» C. a memory location whose value cannot change while the program is running
4237.

The statement int num[2][3]={ {3,8,6}, {9,4,7}};

A. assigns a value 4 to num[1][2]
B. assigns a value 7 to num[1][2]
C. assigns a value 8 to num[1][2]
D. assigns a value 9 to num[1][2]
Answer» C. assigns a value 8 to num[1][2]
4238.

Loaders that allow for program relocation are called

A. relocating loaders
B. relative loaders
C. both (a) and (b)
D. None of the above
Answer» D. None of the above
4239.

In analyzing the compilation of PL/I program, the term "Machine independent optimization" is associated with

A. recognition of basic syntactic constructs through reductions
B. recognition of basic elements and creation of uniform symbols
C. creation of more optional matrix
D. use of macro processor to produce more optimal assembly code
Answer» D. use of macro processor to produce more optimal assembly code
4240.

The function(s) of the Syntax phase is/ are:

A. to recognize the major constructs of the language and to call the appropriate action routines that will generate the intermediate form or matrix for these constructs
B. to build a literal table and an identifier table
C. to build a uniform symbol table
D. to parse the source program into the basic elements or tokens of the language
Answer» B. to build a literal table and an identifier table
4241.

When a computer is first turned on or restarted, a special type of absolute loader, called a ______ is executed

A. loader
B. linker
C. bootstrap loader
D. None of the above
Answer» D. None of the above
4242.

Which table is a permanent databases that has an entry for each terminal symbol?

A. Terminal table
B. Literal table
C. Identifier table
D. Reductions
Answer» B. Literal table
4243.

Indicate which of the following is not true about an interpreter?

A. Interpreter generates an object program from the source program
B. Interpreter is a kind of translator
C. Interpreter analyses each source statement every time it is to be executed
D. All of the above
Answer» B. Interpreter is a kind of translator
4244.

The prototype for a derived class constructor may include arguments for

A. data members of the derived class
B. data members of the base class
C. both (a) and (b)
D. neither (a) nor (b)
Answer» D. neither (a) nor (b)
4245.

Overloading involves writing two or more functions with ________

A. different names and different argument lists
B. different names and the same argument list
C. the same name and different argument lists
D. the same name and the same argument list
Answer» D. the same name and the same argument list
4246.

You___________overload function templates

A. may, as long as each version has the same arguments
B. may, as long as each version has different arguments
C. must
D. must not
Answer» C. must
4247.

You typically initialize Character variables to _____

A. a space enclosed in double quotes
B. a space enclosed in single quotes
C. the letter O
D. the number 0
E. the value false
Answer» C. the letter O
4248.

One way pointers are useful is to refer to a memory address that has no _____

A. name
B. constant
C. location
D. field
Answer» B. constant
4249.

Private data can be accessed by

A. class member functions
B. functions in derived classes
C. both (a) and (b)
D. neither (a) nor (b)
Answer» B. functions in derived classes
4250.

The store of memory available to programs is the _____

A. store
B. stack
C. pile
D. heap
Answer» E.