Answer Posted / abhishek karal
In object-oriented programming, a class is a construct that
is used as a blueprint (or template) to create objects of
that class. This blueprint describes the state and behavior
that the objects of the class all share. An object of a
given class is called an instance of the class. The class
that contains (and was used to create) that instance can be
considered as the type of that object, e.g. an object
instance of the "Fruit" class would be of the type "Fruit".
| Is This Answer Correct ? | 21 Yes | 8 No |
Post New Answer View All Answers
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is the difference between static polymorphism and dynamic polymorphism?
Can a destructor be called directly?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What is encapsulation process? What is multilevel inheritance explain with example? How oops is better than procedural? What exactly is polymorphism? What is static modifier? What is polymorphism explain its types? Can an interface inherit a class? What does <> mean pseudocode? what is the drawback of classical methods in oops? Can static class have constructor?