TRB-CS-VIP ONLINE COACHING CENTER (QUIZ-5) C++ Programming
Quiz
- In a simple 'if' statement with no 'else'. What happens if the condition following the 'if is false?
- the program searches for the last else in the program
- nothing
- control 'falls through' to the statement following 'if
- the body of the statement is executed
- If two types of errors may be thrown, you should write _______
- no catch blocks
- one catch block with two arguments
- two catch block-one with an argument, and one without
- two catch blocks with one argument each
- The name of a function ends with
- double quotes
- single quotes
- parenthesis
- #
- Which of the following is not a programming control structure?
- repetition
- selection
- sequency
- sorting
- The bitwise OR operator is a
- unary operator
- binary operator
- ternary operator
- octal operator
- A class Stockltems has four data members and three function members. You define 50 objects as members of the class. Which is true?
- Only one copy of each of the tnree functions exists
- Only one copy of each of the four data members exists
- Both (a) and (b) are true
- Neither (a) nor (b) is true
- The continue statement should be written only
- in the body of a loop.
- in the nested loops
- outside the body of a loop
- any where
- A major advantage of inheritance is
- reducing the time it takes to create new objects
- not having to think about how objects will be used
- reducing the amount of memory required to execute a progrma
- enabling people who have not studied programming to create useful applications
- When a variable exists or is accessible, it is said to be _____
- immediate
- in the path
- availablein scope
- in scope
- . The feature that allows the same operations to be carried out differently depending on the object is _____
- polymorphism
- polygamy
- inheritane
- multitasking
- Which of the following is a C++ class?
- >>
- read()
- cin
- iostream
- Precedence determines which operator
- is evaluated first
- is most important
- is fastest
- operates on the largest number
- When using the standard files that come with the C++ compiler, you should surround the header file name with _____
- square brackets
- angle brackets
- parentheses
- quotes
- The loop condition in a flowchart is represented by a(n) _____
- diamond
- oval
- parallelogram
- rectangle
- Inheritance is the principle that
- classes with the same name must be derived from one another
- knowledge of a general category can be applied to more specific objects
- knowledge of a general category can be applied to more specific objects
- one function name may invoke different methods
- You typically initialize a String variable to _____
- an asterisk
- a space enclosed in single quotes
- the number 0
- a zero-length string
- The set of instructions for how to tie a bow is an example of the _____ structure
- control
- repetition
- selection
- sequence
- If no exception is thrown ________
- a catch block will cause an error
- the first catch block coded will execute
- the last catch block coded with execute
- any catch blocks coded with be bypassed
- A program that predicts the exact sequence in which events will take place is said to be ________
- compiled
- interpreted
- procedural
- object-oriented
- . A blueprint for creating an object in C++ is called ____
- a class
- an instance
- a map
- a pattern
- The prototype for a derived class constructor may include arguments for
- data members of the derived class
- data members of the base class
- both (a) and (b)
- neither (a) nor (b)
- Overloading involves writing two or more functions with _______
- different names and different argument lists
- different names and the same argument list
- the same name and different argument lists
- the same name and the same argument list
- You___________overload function templates
- may, as long as each version has the same arguments
- may, as long as each version has different arguments
- must
- must not
- You typically initialize Character variables to _____
- a space enclosed in double quotes
- a space enclosed in single quotes
- the letter O
- the number 0
- One way pointers are useful is to refer to a memory address that has no _____
- name
- constant
- location
- field
கருத்துகள் இல்லை:
கருத்துரையிடுக