What is the difference between Class and Structure?
Answer Posted / mohanraj.d
1.structure is a value type.but class is a reference type.
2.structure is stored in stack.but class is stored in heap.
3.struct cannot have default constructor.
4.struct do not support inheritance.
5.class can inherit from a class.
6.struct cannot have declare destructor.
7.class has define object and function.
8.structure has define only object.
| Is This Answer Correct ? | 50 Yes | 28 No |
Post New Answer View All Answers
What are signs of manipulation?
What is difference between c++ and c ++ 14?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
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.
What are keywords in c++?
Define friend function.
Why do we use string in c++?
Comment on c++ standard exceptions?
Can we define a constructor as virtual in c++?
What are the advantages of c++? Explain
What do you mean by delegate? Can a user retain delegates?
What is the best c++ ide?
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.
What are the various compound assignment operators in c++?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?