What are the differences between public, private, and
protected access?
Answer Posted / alka choubey
public:class members are access from the outside the class.
private:class members are access only within the class.
protected:class members can access inside the same package.
| Is This Answer Correct ? | 29 Yes | 13 No |
Post New Answer View All Answers
What is the best it certification?
What do c++ programmers do?
Is nan a c++?
Why do we use pointers in c++?
Are iterators pointers?
By using c++ with an example describe linked list?
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.
What is the advantage of c++ over c?
How do you invoke a base member function from a derived class in which you’ve overridden that function?
Why do we need function?
What is the difference between a template and a macro?
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
Explain how a pointer to function can be declared in C++?
What is class invariant in c++?
How does class accomplish data hiding in c++?