Which of the following are true about classes and struct? 1. A class is a reference type whereas a struct is a value type. 2. Objects are created using new whereas structure variables can be created either using new or without using new. 3. A structure variable will always be created slower than an object. 4. A structure variable will die when it goes out of scope. 5. An object will die when it goes out of scope.

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Which of the following are true about classes and struct?

1. A class is a reference type whereas a struct is a value type.
2. Objects are created using new whereas structure variables can be created either using new or without using new.
3. A structure variable will always be created slower than an object.
4. A structure variable will die when it goes out of scope.
5. An object will die when it goes out of scope.

1.124

2.35

3.24

4.345


More MCQS Questions and answers

R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!