Final Test for 370
Can two functions declare variables(non static) with the same name.
a. Yes, but not a very efficient way to write programs
For what values of the expression is an if-statement block not executed?
b. 0
Suppose in a hypothetical machine the size of char is 32 bits. What would sizeof(char) return?
b. 1
There are how many relational operator are offered by C++?
b. 6
How many basic features of OOP are required for a programming language to be purely OOP?
b. 7
Which of the following is correct?
b. An object is an instance of its class
What is the size of wchar_t in C++?
b. Based on the number of bits in the system
Who is the father of C++?
b. Bjarne Stroustrup
Identify the user-defined types from the following?
b. Both enumeration and classes
Which of the following is an abstract data type?
b. Class
HAS-A relationship between the classes is shown through.
b. Container classes
Which constructor is called automatically when we create an object of the class?
b. Copy constructor
Which of the following is not a type of inheritance?
b. Distributive
The value 132.54 can represented using which data type?
b. Double
34. Identify the incorrect option.
b. Enumerators are same as macros
A language which has the capability to generate new data types are called
b. Extensible
The symbol >> is known as
b. Extraction operator
Which of the following statements are true ?
b. F is a function taking an argument of type float and returning a integer
Object cant be used with pointers because they belong to user defined class and compiler cant decide the type of data may be used inside the class.
b. False
Which among doesnt illustrates polymorphism?
b. Function overriding
Extraction operator is also known as
b. Input operator
Cpp does not supports the following
b. Multilevel inheritance
The logical symbol ! This is used for
b. NOT operator
Which of the following statement is true?
b. Neither A) nor B)
Conditional statements can be used within another conditional statements that are called
b. Nesting Conditional statements
____ have the return type void?
b. None of the mentioned
Which of the following class allows to declare only one object of it?
b. Singleton class
29. Identify the incorrect option.
b. Sizeof(char) <= sizeof(long) <=sizeof(wchar_t)
What is the mean of fall through in switch statement?
b. Switch statement that does not include break statement
CPP is both procedural as well as object oriented programming language.
b. True
Boolean expression gives results in the form of
b. True and False
Choose the incorrect option
b. Void is also used when the value of a pointer is null
How many types of polymorphism are C++?
c. 2
Which of the following is a valid floating point literal?
c. 287.e2
How many logical operators are combined to form a compound condition?
c. 3
What does a escape code represent?
c. Alert
What happens when a null pointer is converted into bool?
c. Bool value evaluates to false
Cin stands for
c. Console input
Class function which is called automatically as soon as the object is created is called as __
c. Destructor
Wrapping data and its related functionality into a single entity is known as
c. Encapsulation
When a language has the capability to produce new data type mean it can be called as
c. Extensible
Which of the following is not a type of Constructor?
c. Friend constructor
In C++ what is the sign of character data type by default?
c. Implementation dependent
Which OOPs concept is allowed to reuse the code?
c. Inheritance
What happens if a class does not have a name?
c. It will not have a destructor
Which of the following cannot be a friend?
c. Object
What is default access specifier for data members or member functions declared within a class without any specifier in C++?
c. Private
Which members are inherited but are not accessible in any case?
c. Private
Which of the following is not one of the sizes of the floating point types?
c. Short float
The size_t integer type in C++ is?
c. Unsigned integer of at least 16 bits
Data flowing out of the output stream is called Cout, but data flowing in the input stream is called
c. cin
Is bool a fundamental datatype in CPP?
b. Yes
Which type is best suited to represent the logical values?
d. Boolean
Which of the following belongs to the set of character types?
d. Both wchar_t and char
How many characters are specified in the ASCII scheme?
a. 128
Which of the following shows multilevel inheritance
a. A->B->C
To which of these enumerators can be assigned?
a. All of the mentioned
Pick the odd one out
a. Array type
Which of the following approach is followed by the CPP
a. Bottom-up
An abstract data type out of the following is
a. Class
92. Which of the following is correct?
a. Derived class pointer object cannot point to a base class object
Functions cant return objects.
a. False
Which of the following is not a constructor?
a. Friend constructor
Pick the odd one out.
a. Integer, enum, void
What will happen when defining the enumerated type?
a. It will not allocate memory
Input stream Cin reads the items form
a. Left to right
Which of three sizes of floating point types should be used when extended precision is required?
a. Long double
What is the other name used for functions inside a class?
a. Member functions
Which is the storage specifier used to modify the member variable even though the class object is a constant object?
a. Mutable
The member in class by default are
a. Private
Which member is not accessible outside the class?
a. Private
28. The size of an object or a type can be determined using which operator?
a. Sizeof
What is the full form of STL?
a. Standard template library.
Which of the following is not type of class?
a. Start Class
We can have varying number of arguments for the overloaded form of () operator.
a. True
How members of an object are accessed?
a. Using dot operator/period symbol
Concept used for late binding is
a. Virtual Function
3. Which datatype is used to represent the absence of parameters?
a. Void
30. Which of the following will not return a value?
a. Void
Variables cannot be used before they are declared so their scopes begin
a. Where they are declared
Encapsulation means
a. Wrapping the data into a single unit.
Is the size of character literals different in C and CPP?
a. Yes they are different
Which of the two operators ++ and — work for the bool datatype in C++?
a. ++
Size of boolean variable
d. 1
How much bytes are occupied by int?
d. 2
Which of the following statements are false ?
d. Bool cannot be used as the type of the result of the function
Sequence of statements that is treated as a single statement is called
d. Compound statement
Which of the not an inheritance?
d. Distributive
Which concept means the addition of new components to a program as it runs?
d. Dynamic loading
Special data types that are defined by users is called
d. Enumeration types
The actual values defined in the enumeratorlist is called
d. Enumerators
Which is used to indicate single precision value?
d. F or f
Which one of the following is not a member of the class?
d. Friend Function
Out of the following, which is not a member of the class?
d. Friend function
Which feature of OOP indicates code reusability?
d. Inheritance
Which variable does equals in size with enum variable?
d. Int variable
In which type does the enumerators are stored by the compiler?
d. Integer
Class is pass by _______
d. Reference
Find the odd one out:
d. Std::vector<bool>
Modularity means
d. Sub dividing programs into sub small independent parts