No student devices needed. Know more
20 questions
When a class is derived from a base class it gets access to:
Private
Protected
Private and Protected
Protected and Public
Private, Protected and Public
In a class the access specifiers are _______ by default:
Private
Protected
Public
In C++, we can declare a structure using "structure" keyword.
True
False
Overloading function will have __________ function name, __________ parameters.
same, same
same, different
different, different
A structure is useful when the program needs to store different values of different types in a single collection.
True
False
Given a structure definition, a member of the structure can be accessed by one of the following statements:
Employee.emName
Emp.emName
Emp->emName
Sub function
Is a function executed inside the main function
Is a function executed in another program
Is a function executed outside the main function
Is the main function
Void function
A statement that returns a value
A statement that doesn't return a value
A function that return a value
A function that doesn't return a value
Which of the following statement is the correct way of creating an array (size 20) of the following structure?
Employee emp[20]
Employee[20] emp
Employee emp = new Employee[20]
Which of the following is a valid class declaration?
class A { int x; };
class B { }
public class A { }
object A { int x; };
Constructors are used to ____________
initialize the objects
construct the data members
both initialize the objects & construct the data members
delete the objects
__________ is created from the Class design for each actual thing.
Abstraction
Encapsulation
Polymorphism
Object
When struct is used instead of the keyword class means, what will happen in the program?
access is public by default
access is private by default
access is protected by default
access is denied
An object can access structure members by using the __________ operator.
equal
arrow
double colon
dot
Which index of the array holds the value of 5?
1
2
3
4
Explore all questions with a free account