Q1:what is use of sealed in c#.
a) allow to inherit the class.
b) declare varaible.
c) prevent Inheritance.
d) None of these.
Ans: c
Q2: which of the following should the methods of a class differ if they are to be treated as overloaded methods?
a) Type of arguments
b) Return type of methods
c) Number of arguments
d) Names of methods
e) Order of arguments
Ans: a,c,e
Q3: If s1 and s2 are references to two strings then which of the following are the correct ways to find whether the contents of the two strings are equal?
a) if(s1 = s2)
b) if( strcmp(s1, s2) )
c) int c;
c = s1.CompareTo(s2);
d) if (s1 is s2)
Ans: c
Q4:If s1 and s2 are references to two strings then which of the following are the incorrect ways to find whether the contents of the two strings are equal?
a) if(s1 == s2)
b) if( strcmp(s1, s2) )
c) int c;
c = s1.CompareTo(s2);
d) None of these
Ans: b
No comments:
Post a Comment