MCQOPTIONS
Bookmark
Saved Bookmarks
→
Akamai
→
Aptitude & Logical - Akamai
→
Which of the following CANNOT be a target for a...
1.
Which of the following CANNOT be a target for a custom attribute?
A.
Enum
B.
Event
C.
Delegate
D.
Namespace
Answer» E.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
C#.NET structures are always value types.
Which of the following will be the correct output for the C#.NET program given below? namespace IndiabixConsoleApplication { struct Sample { public int i; } class MyProgram { static void Main() { Sample x = new Sample(); x.i = 10; fun(x); Console.Write(x.i + " "); } static void fun(Sample y) { y.i = 20; Console.Write(y.i + " "); } } }
The space required for structure variables is allocated on stack.
Which of the following statements are correct about Structures used in C#.NET? A Structure can be declared within a procedure. Structs can implement an interface but they cannot inherit from another struct. struct members cannot be declared as protected. A Structure can be empty. It is an error to initialize an instance field in a struct.
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.
Which of the following statements is correct about the C#.NET code snippet given below? struct Book { private String name; private int noofpages; private Single price; } Book b = new Book();
When would a structure variable get destroyed?
Which of the following statements are correct? A struct can contain properties. A struct can contain constructors. A struct can contain protected data members. A struct cannot contain methods. A struct cannot contain constants.
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;
How many bytes will the structure variable samp occupy in memory if it is defined as shown below? class Trial { int i; Decimal d; } struct Sample { private int x; private Single y; private Trial z; } Sample samp = new Sample();
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies