Difference between Class and Struct.
Answer Posted / naresh kukreti
1)measure difference between structure and class is that
the structure doesn't inherit but class is inherit
2)by default the data members of structure are public but in
case of class data members are private
3) Class is much secure ,but structure is not secure
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is %s and %d in c?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is the purpose of & in scanf?
Where are the auto variables stored?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
How can I recover the file name given an open stream?
Tell me when would you use a pointer to a function?
what is the basis for selection of arrays or pointers as data structure in a program
What is meant by keywords in c?
what are # pragma staments?
Which built-in library function can be used to match a patter from the string?
What is variables in c?
Why & is used in c?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
how to write a c program to print list of fruits in alpabetical order?