Explain the differences between public, protected, private
and internal.
Answers were Sorted based on User's Feedback
Answer / avinash
public means we can access the code or data in public that
is visible to others.
protected means the code or data can be within the system
and,or it has no access to it.and it is not available.
private means it can be accessesed only by the person who
has the access or key to it.
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
Why does this code crash?
whats the use of header file in c?
Do pointers store the address of value or the actual value of a variable?
c program to compute Income tax and Net Salary for its employees. The company offers tax relief of Kshs. 650 for single employees and Kshs. 1,100 for married employees. The relief will be deducted from the Gross salary, to give the taxable income. This will be computed at the following rates: [10mks] Taxable Income Rate (%) <5000 0 5000-19999 6 20000-36999 9 37000 and above 16
Can you add pointers together? Why would you?
What do you mean by command line argument?
What are Storage Classes in C ?
32 Answers CTS, HP, IBM, Maharaja Whiteline, Tamil Nadu Open University TNOU, TATA, TCS, Wipro,
#‎include‬<stdio.h> void main() { int i; for(i=5;0;i++) { printf("%d",i); } }
What are high level languages like C and FORTRAN also known as?
Write a program to reverse a linked list in c.
What are pointers really good for, anyway?
What is a class?