In context of C++, which of the following is a valid statement ?
C++ के संदर्भ में, निम्न में से कौन-सा एक उचित कथन है ?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. Keywords private, protected and public may appear in any order and any number of times in a class.एक क्लास में Private, Protected तथा public की - वड्र्स किसी भी क्रम में तथा कितनी भी बार आ सकते हैं।
Explanation
Access specifiers may appear any number of times in any order inside a class. A friend is not a member, static data can be changed, and non-static member functions can also use static data.
क्लास में private, protected, public कितनी भी बार किसी भी क्रम में आ सकते हैं। फ्रेंड फलन सदस्य नहीं होता, स्टेटिक डेटा बदला जा सकता है और नॉन-स्टेटिक फलन भी उसे एक्सेस कर सकते हैं।
More Programming Concepts & Python questions
- In C file handling equivalent to scanf("%d",&val); is :
- A variable declared within the block {} has the following scope :
- What is a copy constructor ?
- In the given declaration of an array : float height[50];
- The functions 'cin' and 'cout' resolve the necessary conversions at :
- In C++, << operator used for shifting bits can also be used for :