MEDIUM
Earn 100

Which among following is correct for initialising the class below?
class student{
int marks;
int cgpa;
public: student(int i, int j){
marks=I;
cgpa=j
}
};
(a)student s[3]={ s(394, 9); s(394, 9); s(394,9); };
(b)student s[2]={ s(394,9), s(222,5) };
(c)student s[2]={ s1(392,9), s2(222,5) };
(d)student s[2]={ s[392,9], s2[222,5] };

50% studentsanswered this correctly
Important Questions on C Language and OOP
EASY
Study the following program fragment
int ;
putchar ;
what it does?

EASY
Which of the following is not a property of an object?

MEDIUM
Which feature of OOP is indicated by the following code?
class student{ int marks; };
class topper:public student{ int age; topper(int age){ this.age=age; } };

EASY
Object declared in main() function _____________

EASY
Which header file is required in C++ to use OOP?

EASY
Which of these features of OOP would indicate code reusability?

EASY
___________ underlines the feature of Polymorphism in a class.

EASY
In which access should a constructor be defined, so that object of the class can be created in any function?

MEDIUM
If a class have two data members and two functions then to add those two numbers and to subtract them, which among the following is most efficient if the programmer wants to implement multiplication too?

EASY
Which is the correct syntax of inheritance?

EASY
In multilevel inheritance, which is the most significant feature of OOP used?

MEDIUM
Which of the following is not correct (in C++) ?
i) Class templates and function templates are instantiated in the same way
ii) Class templates differ from function templates in the way they are initiated
iii) Class template is initiated by defining an object using the template argument
iv) Class templates are generally used for storage classes.

EASY
Which is the example of object-oriented language.

EASY
How many objects can be declared of a specific class in a single program?

EASY
Which feature of OOP reduces the use of nested classes?

MEDIUM
Which of the following is a valid class declaration?

EASY
Which is not the property of object in OOPS?

EASY
Instance of which type of class can’t be created?

EASY
Which definition best describes an object?

MEDIUM
What is an abstraction in object-oriented programming?

