delegates c programming questions

11.

Suppose on pushing a button an object is to be notified, but it is not known until runtime which object should be notified. Which of the following programming constructs should be used to implement this idea?
A.     Attribute    B.     Delegate
C.     Namespace    D.     Interface
E.     Encapsulation
Answer & Explanation

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
12.

Which of the following statements is incorrect about a delegate?
A.     A single delegate can invoke more than one method.
B.     Delegates can be shared.
C.     Delegate is a value type.
D.     Delegates are type-safe wrappers for function pointers.
E.     The signature of a delegate must match the signature of the method that is to be called using it.
Answer & Explanation

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
13.

Suppose a Generic class called SortObjects is to be made capable of sorting objects of any type (Integer, Single, Byte etc.). Which of the following programming constructs should be used to implement the comparision function?
A.     Namespace    B.     Interface
C.     Encapsulation    D.     Delegate
E.     Attribute
Answer & Explanation

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
14.

With which of the following can the ref keyword be used?

Static data
Instance data
Static function/subroutine
Instance function/subroutine

A.     1, 2
B.     3, 4
C.     1, 3
D.     2, 4
E.     All of the above
Answer & Explanation

Answer: Option B

Explanation:

No answer description available for this question.

Leave a Reply0

Your email address will not be published.