Structures

Q1:
Which of the following will be the correct result of the statement b = a in the C#.NET code snippet given below?
struct Address
{
    private int plotno;
    private String city; 
}
Address a = new Address(); 
Address b; 
b = a;

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.

E Address of the first element of a will get copied into b.

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

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.