What is the difference between Class and Structure?
Answer Posted / riyaz
Class Can be abstract but structure can't
Class support inheritance but sturcutre can't
Class allows modifiers such as public,private but structure by default allow public
Class can used for huge amount of data, structure is for limited amount of data
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are move semantics?
State two differences between C and C++.
What is the use of data hiding?
What does catch(…) mean?
How does the copy constructor differ from the assignment operator (=)?
Explain the use of virtual destructor?
What are the various storage classes in C++?
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.
How can virtual functions in c++ be implemented?
What do the header files usually contains?
What is code reusability in c++?
What does new in c++ do?
How would you differentiate between a pre and post increment operators while overloading?
Explain the differences between list x; & list x();.
Distinguish between a # include and #define.