Which of the following are true about classes and struct? A class is a reference type, whereas
Fantastic news! We've Found the answer you've been seeking!
Question:
Which of the following are true about classes and struct?
- A class is a reference type, whereas a struct is a value type.
- Objects are created using new, whereas structure variables can be created either using new or without using new.
- A structure variable will always be created slower than an object.
- A structure variable will die when it goes out of scope.
- An object will die when it goes out of scope.
A. | 1, 2, 4 |
B. | 3, 5 |
C. | 2, 4 |
D. | 3, 4, 5 |
Related Book For
Posted Date: