Programming Practices Using C++

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Rabib
R
Rabib
Community Contributor
Quizzes Created: 3 | Total Attempts: 2,328
| Attempts: 683 | Questions: 70
Please wait...
Question 1 / 70
0 %
0/100
Score 0/100
1.  What is object in C++ ?

Explanation

In C++, an object is an instance of a class. A class is a blueprint or template that defines the properties and behaviors of objects. When we create an object, we are essentially creating a specific instance of that class, with its own unique set of values for the member variables. This allows us to create multiple objects of the same class, each with its own distinct characteristics and behaviors.

Submit
Please wait...
About This Quiz
Programming Practices Using C++ - Quiz

Explore key C++ programming concepts through this targeted quiz. Assess your understanding of singleton classes, constructors, inheritance, and more. Enhance your programming skills and prepare for advanced software development roles.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. What is true about Constructor ?

Explanation

The correct answer is that the name of a constructor is the same as the name of the class. In object-oriented programming, a constructor is a special method that is used to initialize objects of a class. It is called automatically when an object is created and is responsible for setting initial values for the object's attributes. By convention, the name of the constructor is the same as the name of the class it belongs to. This allows the compiler to identify and call the correct constructor when an object is instantiated.

Submit
3. Data members and member functions are enclosed within ?

Explanation

In object-oriented programming, data members and member functions are typically enclosed within a class. A class is a blueprint for creating objects that define the properties (data members) and behaviors (member functions) of those objects. It provides a way to organize and encapsulate related data and functions together, allowing for better code organization and reusability.

Submit
4. Which among following is correct way of declaring object of a class ?

Explanation

The correct way of declaring an object of a class is by using the syntax "Classname Objectname;". This syntax creates an instance of the class with the specified name. The other options provided in the question are incorrect syntax for declaring objects in C++.

Submit
5. Which of the following keywords are used to control access to a class member ?

Explanation

The keyword "protected" is used to control access to a class member. It allows the member to be accessed within the class itself, as well as by its subclasses and other classes in the same package. This keyword provides a level of encapsulation and restricts direct access to the member from outside the class hierarchy.

Submit
6. Which among following is not a valid visibility mode in c++ program ?

Explanation

The visibility modes in C++ determine the accessibility of class members. Private members can only be accessed within the class, public members can be accessed from anywhere, and protected members can be accessed within the class and its derived classes. However, "Limited" is not a valid visibility mode in C++.

Submit
7. Among following which will give the size of object or type ?

Explanation

The sizeof operator in C is used to determine the size, in bytes, of a data type or a variable. It can be used to find the size of built-in data types like int, float, char, etc., as well as user-defined data types such as structures and arrays. Unlike functions like malloc, calloc, and realloc, which are used for dynamic memory allocation, sizeof does not allocate memory. Instead, it simply returns the size of the object or type. Therefore, among the given options, sizeof is the correct choice for finding the size of an object or type.

Submit
8. Reference is like a _____. 

Explanation

A pointer is a reference to a memory address that allows us to directly access and manipulate the data stored at that address. Similarly, a reference in programming is a type that refers to another type, allowing us to access and manipulate the data of the referenced type. Therefore, a pointer can be considered as a reference, making it the most suitable option for completing the analogy in the question.

Submit
9. Destructor has the same name as the constructor and it is preceded by ______ .

Explanation

The destructor has the same name as the constructor and is preceded by the tilde (~) symbol. This symbol is used to indicate that the function is a destructor.

Submit
10. What is data hiding ?

Explanation

Data hiding is a concept in object-oriented programming that involves encapsulating the internal details of an object and preventing direct access to them from outside the object. This is done to ensure that the internal state and implementation of an object are not exposed to the external world, promoting security, modularity, and flexibility in software development. By hiding the internal details, the object can control how it is accessed and manipulated, providing a level of abstraction and protecting its integrity.

Submit
11. What is actual syntax of destructor in c++ ?

Explanation

The actual syntax of a destructor in C++ is "~Classname( )". The tilde (~) symbol is used to indicate that it is a destructor, followed by the class name in parentheses. The destructor is a special member function that is automatically called when an object of the class is destroyed or goes out of scope. It is used to release any resources or memory that the object may have acquired during its lifetime.

Submit
12. Which of the following keywords are used to control access to a class member ?

Explanation

The keyword "protected" is used to control access to a class member. It allows the member to be accessed by other members of the same class or by its subclasses. This keyword provides a level of encapsulation and restricts direct access to the member from outside the class hierarchy.

Submit
13. A reference is declared using the _____ symbol.

Explanation

The correct answer is "&". In programming, the "&" symbol is used to declare a reference variable. A reference variable is a type of variable that refers to an existing object in memory rather than holding its own value. By using the "&" symbol, a reference variable can be declared and assigned to an existing object, allowing multiple variables to refer to the same object.

Submit
14. Which of following valid option will not return a value in c++ ?

Explanation

The keyword "void" in C++ is used to indicate that a function does not return a value. It is commonly used for functions that perform actions but do not need to return any specific result. Therefore, the option "void" will not return a value in C++.

Submit
15. What is class in c++ ?

Explanation

A class in C++ is a blueprint for creating objects of a particular data type. It defines the structure and behavior of the objects that will be created based on the class. By defining a class, you specify the attributes (data members) and methods (member functions) that the objects of that class will have. This allows you to create multiple objects of the same class, each with its own set of attributes and behavior. The class acts as a template or blueprint that can be used to create objects with similar characteristics.

Submit
16. Which of the following is not a type of constructor?

Explanation

A friend constructor is not a type of constructor. In C++, a friend function is a function that is not a member of a class but has access to the private and protected members of the class. However, constructors cannot be declared as friend functions. Therefore, a friend constructor does not exist.

Submit
17.  What is meant by multiple inheritance?

Explanation

Multiple inheritance refers to the concept of deriving a derived class from more than one base class. In this scenario, the derived class inherits the properties and behaviors of multiple base classes, allowing it to access and use the features of each base class. This allows for greater flexibility in designing and implementing class hierarchies, as it enables the derived class to combine the characteristics of multiple base classes.

Submit
18. Which of the following never requires any arguments?

Explanation

A default constructor is a special type of member function that is automatically called when an object of a class is created without any arguments. It is used to initialize the object's data members to their default values. Unlike other types of functions, a default constructor does not require any arguments to be passed to it. Therefore, it never requires any arguments.

Submit
19. & operator is ?

Explanation

The correct answer is "address operator." The & operator in C++ is used as the address operator, which returns the memory address of a variable. It is used to access and manipulate the memory location of a variable, allowing programmers to directly modify the value stored at that memory location.

Submit
20. Which inheritance type is used in the class given below? 
class A : public X, public Y {}

Explanation

The class A is inheriting from two different classes, X and Y, using the public access specifier. This means that class A will have access to both the public and protected members of classes X and Y. This is an example of multiple inheritance, where a class can inherit from multiple base classes.

Submit
21. Size of a char is ?

Explanation

The size of a char is 1 byte. In most programming languages, including C and C++, a char data type is used to represent a single character. Since a byte is typically composed of 8 bits, a char can hold 8 bits of information, allowing it to represent a wide range of characters from different character sets.

Submit
22.  How we can define member function outside the class ?

Explanation

Member functions in C++ can be defined outside the class by using the scope resolution operator (::). This allows the member function to be defined separately from the class declaration, providing better organization and readability of the code. By using the scope resolution operator, the function can be associated with the class and accessed using the class name followed by the scope resolution operator. This method is commonly used when the function implementation is lengthy or when the class has multiple member functions.

Submit
23. When a derived class inherits from many base classes, this process is known as ?

Explanation

Multiple inheritance refers to the process of a derived class inheriting from multiple base classes. In this process, a derived class can inherit the characteristics and behaviors of multiple base classes, allowing for the combination of features from different parent classes. This can be useful in situations where a class needs to inherit from multiple sources to acquire the desired functionality.

Submit
24. Which of the following provides a reuse mechanism?

Explanation

Inheritance provides a reuse mechanism in object-oriented programming. It allows a class to inherit properties and behaviors from another class, known as the superclass or base class. This means that the subclass or derived class can reuse and extend the functionality of the superclass, reducing code duplication and promoting code reusability. Inheritance facilitates the creation of a hierarchical relationship between classes, where subclasses can inherit and modify the attributes and methods of the superclass, promoting code organization and modularity.

Submit
25. Which of the following problem causes an exception?

Explanation

A run-time error refers to an error that occurs during the execution of a program. It can be caused by various factors such as dividing by zero, accessing an invalid memory location, or attempting to perform an operation on incompatible data types. In this case, the missing semicolon or a problem in calling a function would result in a syntax error, not a run-time error. Therefore, the correct answer is A run-time error.

Submit
26. Which of the following type of class allows only one object of it to be created?

Explanation

A singleton class allows only one object of it to be created. This is achieved by making the constructor of the class private, so that it cannot be called from outside the class. The class provides a static method that returns the instance of the class, and if an instance already exists, it returns that instance instead of creating a new one. This ensures that only one object of the class can exist at a time, making it a singleton class.

Submit
27. Which among following is used to open a file in binary mode ?

Explanation

The correct answer is ios::binary. This is because ios::binary is used to open a file in binary mode. Binary mode is used when dealing with non-text files, such as image or audio files, where the data is represented in binary format instead of characters.

Submit
28. Which of the following cannot be passed to a function ?

Explanation

A file cannot be directly passed to a function because it represents a physical file in the system and is not a data type that can be directly manipulated or passed as a parameter. However, the file can be accessed and manipulated within a function by passing its file path or using file handling functions.

Submit
29. How we can access data members using objects ?

Explanation

To access data members using objects, the correct syntax is object.datamember. The dot operator is used to access the data member of an object. This syntax allows us to directly access the data member of the object by specifying the object name followed by a dot and then the data member name.

Submit
30. Which of the following approach is adapted by C++?

Explanation

C++ follows the bottom-up approach. This means that the program starts executing from the lowest level of the hierarchy and gradually moves up to the higher levels. In C++, functions are defined before they are used, allowing the program to be organized in a way that functions can call each other in a hierarchical manner. This approach helps in efficient memory management and allows for better code organization and reusability.

Submit
31. The major goal of inheritance in C++ is ?

Explanation

Inheritance in C++ allows for the reusability of code by allowing a class to inherit the properties and methods of another class. This means that a new class can be created based on an existing class, inheriting its attributes and behaviors. By reusing code in this way, developers can save time and effort by not having to rewrite the same code multiple times. Inheritance also promotes modular programming by allowing classes to be organized into a hierarchical structure, making the code more organized and easier to maintain.

Submit
32. Which symbol is used to create multiple inheritance?
 

Explanation

Comma is used to create multiple inheritance in some programming languages, such as C++. Multiple inheritance allows a class to inherit from more than one base class, and the comma is used to separate the names of the base classes in the class declaration. This allows the derived class to inherit the properties and behaviors from multiple parent classes.

Submit
33. Which of the following implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class?

Explanation

The compiler implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class. A default constructor is a constructor with no parameters, and it is automatically generated by the compiler if no other constructors are defined. This default constructor initializes the member variables of the class with their default values.

Submit
34.  Which variables cannot be declared ?

Explanation

Void is not a data type and therefore cannot be used to declare variables. Void is typically used as a return type for functions that do not return a value.

Submit
35. What is purpose of abstract class ?

Explanation

An abstract class is designed to serve as a blueprint or template for other classes to inherit from. It cannot be instantiated on its own but provides a common structure and behavior that can be shared by its subclasses. This allows for code reusability and promotes a hierarchical organization of classes. It also enforces the implementation of certain methods or properties in its subclasses, ensuring that they adhere to a specific contract. Therefore, the purpose of an abstract class is to provide an appropriate base class from which other classes can inherit.

Submit
36. Pick out the correct statement.
 

Explanation

This statement is correct because it suggests that by writing one function, it can be used with multiple types of data. This promotes code reusability and reduces the need for duplicating code for different data types.

Submit
37. Functions can be declared to return a reference type. There are reasons to make such a declaration/Which of the following reasons are correct?
  1. The information being returned is a large enough object that returning a reference is more efficient than returning a copy.
  2. The type of the function must be a R-value.

Explanation

Both 1 and 2 are correct. Functions can be declared to return a reference type when the information being returned is a large enough object that returning a reference is more efficient than returning a copy. Additionally, the type of the function can be an R-value.

Submit
38. Which of the following operators cannot be overloaded?

Explanation

The ?: operator, also known as the ternary operator, cannot be overloaded. This operator is used for conditional expressions and it takes three operands. It evaluates a condition and returns one of two values depending on whether the condition is true or false. Since the ?: operator is built into the language and has a fixed functionality, it cannot be overloaded to change its behavior.

Submit
39. How many types of polymorphisms are supported by C++?

Explanation

C++ supports two types of polymorphisms: compile-time polymorphism and runtime polymorphism. Compile-time polymorphism is achieved through function overloading and templates, where different functions or templates can be called based on the types of arguments passed. Runtime polymorphism is achieved through inheritance and virtual functions, where a base class pointer can point to objects of different derived classes, and the appropriate function is called based on the actual object type at runtime.

Submit
40. To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ .

Explanation

To ensure that every object in the array receives a destructor call, it is necessary to use the "delete[]" operator. This operator is specifically designed to deallocate memory that was allocated using the "new[]" operator for arrays. Using the "delete" operator without the square brackets would only deallocate memory for a single object, not an array of objects. Similarly, "kill[]" and "free[]" are not valid operators in C++ for deallocating memory. Therefore, the correct operator to use in this case is "delete[]".

Submit
41. What is default visibility mode for members of classes in C++ ?

Explanation

In C++, the default visibility mode for members of classes is private. This means that by default, the members of a class are only accessible within the class itself and cannot be accessed from outside the class. Private members can only be accessed through public member functions or friend functions.

Submit
42. Which one do you like?

Explanation

not-available-via-ai

Submit
43. Which of the following ways are legal to access a class data member using this pointer?

Explanation

The correct way to access a class data member using the this pointer is by using the arrow operator (->). The arrow operator is used to access the member of the object pointed to by the this pointer. In this case, the data member x is accessed using this->x. The other options, this.x, *this.x, and *this-x, are not valid ways to access a class data member using the this pointer.

Submit
44. Which is correct syntax ?

Explanation

The correct syntax is myfile.open ("example.bin", ios::out); because it uses the correct syntax for opening a file with the specified filename and mode. The ios::out flag is used to open the file in output mode, allowing writing to the file.

Submit
45. Which of the following advantages we lose by using multiple inheritance?
 

Explanation

When using multiple inheritance, we lose the advantage of dynamic binding and polymorphism. Dynamic binding allows the selection of the appropriate function at runtime based on the object type, while polymorphism allows objects of different classes to be treated as objects of a common superclass. However, with multiple inheritance, conflicts may arise when two base classes have the same function name, leading to ambiguity and making it difficult to determine which function should be called. This results in the loss of dynamic binding and polymorphism advantages.

Submit
46.  Which design patterns benefit from the multiple inheritance?
 

Explanation

The adapter and observer patterns benefit from multiple inheritance because they involve the need to inherit from multiple classes or interfaces. The adapter pattern allows objects with incompatible interfaces to work together by adapting one interface to another, and multiple inheritance can be used to inherit from both the target interface and the adapting class. The observer pattern involves a one-to-many relationship between objects, where multiple inheritance can be used to inherit from both the subject being observed and the observer interface. Therefore, these patterns can benefit from multiple inheritance.

Submit
47. Which is used to describe the function using placeholder types?
 

Explanation

Template type parameters are used to describe the function using placeholder types. These parameters allow the function to be flexible and work with different types of data without having to rewrite the function for each specific type. By using template type parameters, the function can be written once and then used with different types as needed.

Submit
48. Which of the following is an invalid visibility label while inheriting a class?

Explanation

Friend is an invalid visibility label while inheriting a class. In object-oriented programming, friend is not a valid access specifier for inheritance. Public, private, and protected are the three valid access specifiers used to control the visibility of class members in inheritance. Friend is used to grant access to private or protected members of a class to another class or function, but it cannot be used to specify the visibility of a derived class.

Submit
49. Which one do you like?

Explanation

The given question asks for personal preference, so the correct answer would depend on the individual's liking. Since the answer provided is "Option 1," it implies that the person prefers the first option among the given choices.

Submit
50. Which of the following keyword is used to overload an operator?

Explanation

The keyword "operator" is used to overload an operator in C++. Overloading an operator allows us to redefine the behavior of an operator for user-defined types. This means we can use operators like +, -, *, /, etc. with our own custom classes or data types. By overloading an operator, we can define what it means to add, subtract, multiply, or divide objects of our own class.

Submit
51. Which one of the following options is correct about the statement given below?The compiler checks the type of reference in the object and not the type of object.

Explanation

Polymorphism is the correct option because it allows objects of different types to be treated as objects of a common type. In the given statement, the compiler checks the type of reference (the variable or parameter) in the object rather than the type of the actual object itself. This is a key feature of polymorphism, as it allows for flexibility and dynamic behavior in object-oriented programming.

Submit
52. Which of the following concepts is used to implement late binding?

Explanation

Virtual functions are used to implement late binding in object-oriented programming languages. Late binding allows the selection of the appropriate function implementation at runtime based on the actual type of the object being referred to, rather than the type of the reference. This enables polymorphism, where a single function can be used to handle objects of different classes that are derived from a common base class. By declaring a function as virtual, the derived class can provide its own implementation of the function, which will be called instead of the base class implementation when the function is invoked through a base class reference or pointer.

Submit
53. The derived class constructor

Explanation

The derived class constructor is responsible for passing the entire set of arguments needed by the base class constructors. This means that when creating an object of the derived class, the derived class constructor must ensure that all the necessary arguments required by the base class constructors are provided. This ensures that the base class is properly initialized before the derived class is instantiated.

Submit
54. Which of the following correctly describes overloading of functions?

Explanation

Ad-hoc polymorphism is the correct term to describe the overloading of functions. This refers to the ability of a function to perform different operations based on the type or number of arguments passed to it. It allows multiple functions with the same name but different parameter lists to coexist and be called based on the specific arguments provided. This allows for flexibility and code reusability by providing different implementations of a function for different data types or argument combinations.

Submit
55. Which of the following statement is correct?

Explanation

In Python, all the parameters of a function can be default parameters. Default parameters allow us to assign a default value to a parameter, which is used when the argument for that parameter is not provided. This means that if no arguments are passed for any of the parameters, the default values will be used. Having all parameters as default parameters gives us flexibility in calling the function with any combination of arguments, as any missing arguments will use their default values.

Submit
56. If the copy constructor receives its arguments by value, the copy constructor would

Explanation

If the copy constructor receives its arguments by value, it means that the copy constructor is being called with a copy of an object as its argument. In this case, if the copy constructor calls itself recursively, it would create an infinite loop where the copy constructor keeps calling itself with copies of the object. This would lead to a stack overflow error and the program would crash. Therefore, the correct answer is that the copy constructor would call itself recursively.

Submit
57. Which of the following function prototype is perfectly acceptable?

Explanation

The correct answer is "int Function(int Tmp = Show());" because it is a valid function prototype. It declares a function named "Function" that takes an integer parameter "Tmp" with a default value set to the result of the function "Show()". This means that if no argument is provided when calling the "Function" function, it will use the default value returned by "Show()".

Submit
58. Which stream class is to only write on files ?

Explanation

ofstream is the correct answer because it is a stream class in C++ that is used specifically for writing data to files. It is derived from the ostream class and provides functions and operators to write data to output files. ifstream, on the other hand, is used for reading data from input files, fstream is used for both reading and writing, and iostream is a base class for both input and output streams but does not specifically cater to file operations.

Submit
59. How to get position to the nth byte of fileObject ?

Explanation

The correct answer is fileObject.seekg( n ). This is because the seekg() function is used to set the position of the next character to be extracted from the input stream associated with the fileObject. It takes the offset value n as its argument and sets the position to the nth byte in the file. The other options provided in the question are incorrect syntax or use incorrect arguments for the seekg() function.

Submit
60. Which of the following function / types of function cannot have default parameters?

Explanation

Main() function cannot have default parameters because it is the entry point of a program and it must follow a specific signature defined by the programming language. The main() function is called by the operating system to start the execution of a program, and it expects a specific set of arguments (argc and argv) to be passed to it. Therefore, it cannot have default parameters as it would conflict with the expected signature.

Submit
61. Which one of the following is the correct way to declare a pure virtual function?

Explanation

The correct way to declare a pure virtual function is by using the syntax "virtual void Display(void) = 0;". The keyword "virtual" indicates that the function is virtual, and the "= 0" at the end indicates that the function is pure virtual. A pure virtual function is a virtual function that has no implementation in the base class and must be overridden in the derived classes.

Submit
62. Which of the following cannot be used with the keyword virtual?

Explanation

The keyword "virtual" can be used with class, member functions, and destructor, but it cannot be used with the constructor. The reason for this is that the constructor is responsible for initializing the object and it cannot be overridden or inherited like other member functions. Therefore, it does not make sense to use the "virtual" keyword with the constructor.

Submit
63. Which of the following statement will be correct if the function has three arguments passed to it?

Explanation

If a function has three arguments passed to it, the trailing argument will be the default argument. This means that the first two arguments will be explicitly passed by the caller, while the third argument will take on its default value as defined in the function's declaration.

Submit
64. Inheritance is referred to as

Explanation

Inheritance is referred to as the "is a" relationship because it allows a class to inherit the properties and behaviors of another class. This means that a subclass is considered to be a specialized version of its superclass, sharing common attributes and methods. This relationship is based on the concept of specialization and generalization, where the subclass inherits all the characteristics of the superclass and can also add its own unique features. Therefore, the correct answer is the "is a" relationship.

Submit
65. Enumerators are stored by the compiler in ?

Explanation

The correct answer is "integer" because enumerators are typically represented as integer values by the compiler. Each enumerator in an enumeration is assigned a unique integer value by default, starting from 0 and incrementing by 1 for each subsequent enumerator. This allows the compiler to efficiently store and manipulate the enumerators as integers in memory.

Submit
66. Where the default value of parameter have to be specified?

Explanation

The default value of a parameter has to be specified in the function prototype. The function prototype is a declaration of the function that includes the function name, return type, and parameter types. It allows the compiler to know about the function before it is defined or called. By specifying the default value in the function prototype, the compiler knows what value to use for the parameter if no argument is provided during the function call.

Submit
67. The default visibility mode while inheriting is ?

Explanation

When a class inherits from another class, the default visibility mode for the inherited members is private. This means that the inherited members can only be accessed within the class that inherited them and are not accessible outside of that class. This default visibility mode ensures encapsulation and restricts access to the inherited members, providing control over their usage and preventing unintended modifications or access from other classes.

Submit
68. Which of the following statements is correct in C++?

Explanation

The correct answer is "Structures can have functions as members." In C++, structures can have both data members and function members. This allows for the encapsulation of related data and functions within a single structure, making it a convenient way to organize and manipulate data. Unlike classes, which have default access specifiers for their members (private by default), structures have default access specifiers for their members (public by default). This means that all members of a structure are accessible by default, unless specified otherwise.

Submit
69. A variable is defined within a block in a body of a function. Which of the following are true ?

Explanation

A variable defined within a block in the body of a function is only visible within that block. It is not visible outside of the block or throughout the entire program. Therefore, the statement "It is visible throughout the function" is not correct.

Submit
70.  The process of deriving a class from another derived class is known as ?

Explanation

Single inheritance is the process of deriving a class from another derived class. In this type of inheritance, a class can inherit properties and methods from only one base class. This means that the derived class has access to all the members of its immediate base class, as well as the members of its base class. Therefore, the correct answer for the given question is single inheritance.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 19, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 19, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 14, 2015
    Quiz Created by
    Rabib
Cancel
  • All
    All (70)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
 What is object in C++ ?
What is true about Constructor ?
Data members and member functions are enclosed within ?
Which among following is correct way of declaring object of a class ?
Which of the following keywords are used to control access to a class...
Which among following is not a valid visibility mode in c++ program ?
Among following which will give the size of object or type ?
Reference is like a _____. 
Destructor has the same name as the constructor and it is preceded by...
What is data hiding ?
What is actual syntax of destructor in c++ ?
Which of the following keywords are used to control access to a class...
A reference is declared using the _____ symbol.
Which of following valid option will not return a value in c++ ?
What is class in c++ ?
Which of the following is not a type of constructor?
 What is meant by multiple inheritance?
Which of the following never requires any arguments?
& operator is ?
Which inheritance type is used in the class given below? class A...
Size of a char is ?
 How we can define member function outside the class ?
When a derived class inherits from many base classes, this process is...
Which of the following provides a reuse mechanism?
Which of the following problem causes an exception?
Which of the following type of class allows only one object of it to...
Which among following is used to open a file in binary mode ?
Which of the following cannot be passed to a function ?
How we can access data members using objects ?
Which of the following approach is adapted by C++?
The major goal of inheritance in C++ is ?
Which symbol is used to create multiple inheritance? 
Which of the following implicitly creates a default constructor when...
 Which variables cannot be declared ?
What is purpose of abstract class ?
Pick out the correct statement. 
Functions can be declared to return a reference type. There are...
Which of the following operators cannot be overloaded?
How many types of polymorphisms are supported by C++?
To ensure that every object in the array receives a destructor call,...
What is default visibility mode for members of classes in C++ ?
Which one do you like?
Which of the following ways are legal to access a class data member...
Which is correct syntax ?
Which of the following advantages we lose by using multiple...
 Which design patterns benefit from the multiple...
Which is used to describe the function using placeholder types? 
Which of the following is an invalid visibility label while inheriting...
Which one do you like?
Which of the following keyword is used to overload an operator?
Which one of the following options is correct about the statement...
Which of the following concepts is used to implement late binding?
The derived class constructor
Which of the following correctly describes overloading of functions?
Which of the following statement is correct?
If the copy constructor receives its arguments by value, the copy...
Which of the following function prototype is perfectly acceptable?
Which stream class is to only write on files ?
How to get position to the nth byte of fileObject ?
Which of the following function / types of function cannot have...
Which one of the following is the correct way to declare a pure...
Which of the following cannot be used with the keyword virtual?
Which of the following statement will be correct if the function has...
Inheritance is referred to as
Enumerators are stored by the compiler in ?
Where the default value of parameter have to be specified?
The default visibility mode while inheriting is ?
Which of the following statements is correct in C++?
A variable is defined within a block in a body of a function. Which of...
 The process of deriving a class from another derived class is...
Alert!

Advertisement