Get benefited from interview Q/A and Online Test section. Subscribe to this blog to get updates directly in your mail box.
Best View in Google Crome, Mozilla firefox or IE 7 or above

Sunday, March 6, 2011

C# Online Test Questions and Answers

1. Can an Interface be instantiated directly?
Yes
No
It can be instantiated with static constructor
None of these
 

2. What is the Difference between Convert.ToInt32 and Int.Parse?
Both are Same
Int.Parse Can't Handle Null values , It will throws ArgumentNullException Error.
Convert.ToInt32 Can't Handle Null Values ,it will throws ArgumentNullException error.
Both can Handle Null Values
Both can't Handle Null Values
 

3. C# doesnot support:
inheritance
polymorphism
abstraction
multiple inheritance
C# supports all
 

4. Whice is true about Interface and abstract methods?
We can write only one abstract method inside interface.
No method is abstract inside interface
All the methods inside Interface in an abstract method.
None of the above
 

5. Which keyword is used to achieve shadowing in C#?
Abstract
Sealed
New
Shadow
None of the above
 

6. Which of the following class cannot be inherited?
Sealed
Abstract
Both
None
 

7. In C#, the statement that is used to replace multiple if statements is called?
?: (ternary operator)
The switch case statement
The nestedif statement
The #endif statement
None of these
 

8. Which of these is a valid path declaration?
string strPath="c:\\abc.txt";
string strPath="c:/abc.txt";
string strPath=@"c:\abc.txt";
All of these
None of these
 

9. What is the difference between Convert.ToString(str) and str.ToString() method?
Convert.ToString(str) function handles NULL while str.ToString() does not. It will throw a NULL reference exception.
str.ToString() function handles NULL while Convert.ToString(str) does not. It will throw a NULL reference exception.
Both can handle NULL
None can Handle NULL
 

10. Waht does a strong name contain?
assembly name
assembly version
publiuc key
All the above
None of these
 

22 comments:

  1. Very good Example

    ReplyDelete
  2. good for testing our skills

    ReplyDelete
  3. thanks and its really usefull !!!!!!!!!!

    ReplyDelete
  4. Thanks Sir
    This is realy basic quiz but we forgot it.
    Sir I want more this type of question.
    Is any link for that please send me on my email
    Id: - shisode.mahesh824@gmail.com
    Please..

    ReplyDelete
  5. Thanks sir
    I want this type of more question for preparation of my interview
    Please you have more resources kindly send me at this email
    abdul.haseeb07a@hotmail.com

    ReplyDelete
  6. Thanks Sir

    Please post Some more program oriented aptitude questions

    ReplyDelete
  7. sunil ,online test

    ReplyDelete
  8. Thank you.. nice one... :-)

    ReplyDelete
  9. Thanks Sir
    This is realy basic quiz but we forgot it.
    Sir I want more this type of question.
    Is any link for that please send me on my email
    Id: - cool.gaurav7@gmail.com
    Please..

    ReplyDelete
  10. Please Sir, I need more!!!!!

    ReplyDelete
  11. Which of these is a valid path declaration?
    string strPath="c:\\abc.txt";
    string strPath="c:/abc.txt";
    string strPath=@"c:\abc.txt";
    All of these
    None of these


    i have some confused this question because C:/abc.txt....but you are u sir...

    ReplyDelete
  12. alawa larke alawa

    ReplyDelete
  13. string strPath="c:/abc.txt";

    The above path is a valid path in C#. Test yourself.

    ReplyDelete

  © Blogger templates Shiny by Ourblogtemplates.com 2008

Back to TOP