Structures - General Questions Online Exam Quiz

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

The space required for structure variables is allocated on stack.

Options

A : True

B : False

C : -

D : -

View Answer

Creating empty structures is allowed in C#.NET.

Options

A : True

B : False

C : -

D : -

View Answer

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

Options

A : 10 20

B : 10 10

C : 20 10

D : 20 20

View Answer

Which of the following is the correct way of setting values into the structure variable e defined below?

Options

A : e.name = "Amol"; e.age = 25; e.sal = 5500;

B : With e { .name = "Amol" ; .age = 25 ; .sal = 5500 ; }

C : With emp e { .name = "Amol" ; .age = 25 ; .sal = 5500 ; }

D : e -> name = "Amol"; e -> age = 25; e -> sal = 5500;

View Answer

Which of the following is the correct way to define a variable of the type struct Emp declared below?

Options

A : 1, 3

B : 2, 5

C : 4, 5

D : 1, 2, 4

View Answer

How many bytes will the structure variable samp occupy in memory if it is defined as shown below?

Options

A : 20 bytes

B : 12 bytes

C : 8 bytes

D : 16 bytes

View Answer

Which of the following will be the correct result of the statement b = a in the C#.NET code snippet given below?

Options

A : All elements of a will get copied into corresponding elements of b .

B : Address stored in a will get copied into b .

C : Once assignment is over a will get garbage collected.

D : Once assignment is over a will go out of scope, hence will die.

View Answer

Which of the following statements are correct?

Options

A : 1, 2

B : 3, 4

C : 1, 2, 4

D : 3, 5

View Answer

C#.NET structures are always value types.

Options

A : True

B : False

C : -

D : -

View Answer

When would a structure variable get destroyed?

Options

A : When no reference refers to it, it will get garbage collected.

B : Depends upon whether it is created using new or without using new .

C : When it goes out of scope.

D : Depends upon the Project Settings made in Visual Studio.NET.

View Answer

Attributes - General Questions more Online Exam Quiz

Interfaces - General Questions

Namespaces - General Questions

Operators - General Questions

Polymorphism - General Questions

Properties - General Questions

Advanced SQL - General Questions

Data and Database Administration - General Questions

Database Design Using Normalization - General Questions

Database Processing for BIS - General Questions

Database Redesign - General Questions