C++ Programming - Objects and Classes - Discussion
Discussion Forum : Objects and Classes - General Questions (Q.No. 8)
8.
Which of the following access specifies is used in a class definition by default?
Discussion:
10 comments Page 1 of 1.
Shafqat said:
6 years ago
By default; class data members (variables) are private and member functions (Methods) are public.
Priyesh singh said:
9 years ago
By default class members are private and structure members are public.
Nandhini said:
10 years ago
Friend is not access specifier. Then private specifier is default if we do not assign the access specifier it will assign private variable.
ROSHAN MAHAJAN said:
1 decade ago
Its default modifier, and how it will become to PRIVATE.
(1)
Bhakti said:
1 decade ago
Please specify work of each private, public, protected and friend specifier ?
Gowsika said:
1 decade ago
When a class specifies default it is a PRIVATE.
Abhishek mishra said:
1 decade ago
By default all member variables and functions are private.
Shobhit said:
1 decade ago
The default access specifier of a class is PRIVATE.
Akilamani said:
1 decade ago
It is wrong by default all access specifier is public.
Saurabh said:
1 decade ago
By Default all members declared in the class are Private.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers