Answer Posted / arvind
Data & Functions in C++ are private by default. That means there is no previlige outside the class. The functions or objects defined outside the class can't access the data and functions.So by making data and functions private with in the class, its making the data hiding and function hiding. By default data is private and functions are public. So this is the concept of data hiding
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is the difference between a mixin and inheritance?
Where is pseudocode used?
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.
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
What is the purpose of polymorphism?
What is the purpose of enum?
What is the point of polymorphism?
How is polymorphism achieved?
What is the real time example of encapsulation?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What does and I oop and sksksk mean?
Why do we use encapsulation in oops?
What is ambiguity in inheritance?
How do you achieve runtime polymorphism?
Plese get me a perfect C++ program for railway/airway reservation with all details.