TRB-CS-VIP ONLINE COACHING CENTER (QUIZ-5) C++ Programming
Quiz
- A member function uses the correct object when you call it because
- a copy of the object is passed to the function
- the address of the object is passed to the function
- the address of the function is passed to another function
- the address of the object is returned from the function
- Two access specifiers in C++ are
- public and private
- int and double
- formal and informal
- void and free
- Which of the following is the fourth problem-solving step?
- analyze the problem
- evaluate and modify (if necessary) the program
- code the algorithm
- plan the algorithm
- Within parentheses, catch blocks can have _____
- no arguments
- one argument
- two arguments
- as many arguments as necessary
- The while loop is referred to as a(n) _____ loop because the loop condition is tested at the beginning of the loop
- beginning
- initial
- pretest
- priming
- The word case used in the switch statement represents a
- function in the C++ language
- data type in the C++ language
- keyword in the C++ language
- global variable in the C++ language
- Function templates _____________
- must have exactly one parameter
- may have more than one parameter as long as they are of the same type
- may have more than one parameter of any type
- may not have parameters
- The statement int num[2][3]={ {3,8,6}, {9,4,7}};
- assigns a value 4 to num[1][2]
- assigns a value 7 to num[1][2]
- assigns a value 8 to num[1][2]
- assigns a value 9 to num[1][2]
- Private data can be accessed by
- class member functions
- functions in derived classes
- both (a) and (b)
- neither (a) nor (b)
- The store of memory available to programs is the _____
- store
- stack
- pile
- heap
- The most common operation used in constructors is _____
- addition
- overloading
- assignment
- polymorphism
- When a function performs tasks based on a decision, it has _____
- functional cohesion
- coincidental cohesion
- logical cohesion
- no cohesion
- To create a template class, you begin with _________
- the template definition
- the keyword class
- the function definitions
- the keyword definition
- Which of the following is a C++ object?
- >>
- read()
- cin
- iostream
- A variable is _____
- an item of data
- a memory location whose value can change while the program is running
- a memory location whose value cannot change while the program is running
- the function definitions
- A function can
- return a value
- perform a task
- change value of actual arguments in call by reference
- a, b, c above are all true
- The statement float values[]={3.14, -7.86, 36.96, 4.87};
- assigns 36.96 to values[2]
- assigns -7.86 to values[2]
- gives an error message
- assign 14 to values[2]
- A constructor initialization list is preceded by _____
- a semicolon
- a colon
- two colons
- a space
- 169 . When the compiler places a copy of a small function's statements directly into a program, the function is said to be _____
- overloaded
- mangled
- inline
- redundant
- A group of related fields that contain all of the data about a specific person, place, or thing is called a
- data file
- field file
- program file
- record
- To send output to a file, you need to include the _____ header file in your program
- file.h
- fstream.h
- iomanip.h
- iostream.h
- A C++ _____ is a program that runs in a DOS window
- algorithm
- cast application
- console application
- source application
- A difference, between reference variables and pointers is that
- reference variables are easier to use
- pointers are easier to use
- reference variables are more flexible
- no difference exists between reference variables and pointers
- A 'C function does not containd
- a function header
- argument declarations
- other 'C' function
- function body
- _____ variables remain in memory until the program ends
- Area
- Global
- Local
- Reference
Ans sir
பதிலளிநீக்கு