Explain the differences between public, protected, private
and internal.
Answer Posted / rahul_kumar007
public:-
--------- It means we can access the property of public;
directly from out side of the class.
private:-
---------- it means we can't access the property of
private;
directly from out side the class.
and we can't intilizing the member var during run time
we have to use constuctor.
proctected:-
If we wnat to inherit private data member only onces.
then we make them protcted
| Is This Answer Correct ? | 10 Yes | 11 No |
Post New Answer View All Answers
What are the complete rules for header file searching?
What are the different types of constants?
What is #define used for in c?
What do mean by network ?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
How do I read the arrow keys? What about function keys?
What are the types of data types and explain?
What is sizeof int?
What is the difference between %d and %i?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
State two uses of pointers in C?
How does pointer work in c?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
Explain what is the use of a semicolon (;) at the end of every program statement?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)