Classes and Objects - General Questions Online Exam Quiz

Classes and Objects - General Questions GK Quiz. Question and Answers related to Classes and Objects - General Questions. MCQ (Multiple Choice Questions with answers about Classes and Objects - General Questions

Which of the following statements is correct about the C#.NET code snippet given below?

Options

A : Contents of s1 and s2 will be exactly same.

B : The two objects will get created on the stack.

C : Contents of the two objects created will be exactly same.

D : The two objects will always be created in adjacent memory locations.

View Answer

Which of the following statements are correct?

Options

A : 1, 3, 5

B : 2, 4

C : 3, 5

D : 2, 4, 5

View Answer

Which of the following statements is correct?

Options

A : Procedural Programming paradigm is different than structured programming paradigm.

B : Object Oriented Programming paradigm stresses on dividing the logic into smaller parts and writing procedures for each part.

C : Classes and objects are corner stones of structured programming paradigm.

D : Object Oriented Programming paradigm gives equal importance to data and the procedures that work on the data.

View Answer

Which of the following is the correct way to create an object of the class Sample ?

Options

A : 1, 3

B : 2, 4

C : 1, 2, 3

D : 1, 4

View Answer

Which of the following will be the correct output for the C#.NET program given below?

Options

A : 0 0

B : 10 5.4

C : 10 5.400000

D : 10 5

View Answer

The this reference gets created when a member function (non-shared) of a class is called.

Options

A : True

B : False

C : -

D : -

View Answer

Which of the following statements are correct?

Options

A : 1, 3, 5

B : 1, 4

C : 2, 4, 5

D : 1, 2, 3

View Answer

Which of the following statements is correct about the C#.NET code snippet given below?

Options

A : s.index = 20 will report an error since index is public .

B : The call s.fun(1, 5) will work correctly.

C : Sample.fun(1, 5) will set a value 5 in arr[ 1 ] .

D : The call Sample.fun(1, 5) cannot work since fun() is not a shared function.

View Answer

Which of the following statements are correct about the C#.NET code snippet given below?

Options

A : 1, 3

B : 2, 4

C : 3, 5

D : 4, 5

View Answer

Which of the following statements is correct about the C#.NET code snippet given below?

Options

A : This is a perfectly workable code snippet.

B : Since int is a primitive, we cannot use new with it.

C : Since an int is a primitive, we cannot call the method ToString() using it.

D : i will get created on stack, whereas j will get created on heap.

View Answer

Attributes - General Questions more Online Exam Quiz

Strings - General Questions

Attributes - General Questions

Collection Classes - General Questions

Constructors - General Questions

Datatypes - General Questions

Delegates - General Questions

.NET Framework - General Questions