C Sharp (C#) questions (MULTIPLE CHOICE) from tutorialspoint.com

  1. Which of the following is correct about Object Type in C#?




    D.
  2. Which of the following converts a type to an unsigned long type in C#?




    B.
  3. Which of the following access specifier in C# allows a class to expose its member variables and member functions to other functions and objects?




    B.
  4. Which of the following operator represents a conditional operation in C#?



    A.
  5. Which of the following is true about catch block in C#?



    C.  Both A. and B.
  6. Which of the following preprocessor directive allows generating a level one warning from a specific location in your code in C#?




    C. warning
  7. Which of the following preprocessor directive lets you modify the compiler's line number and (optionally) the file name output for errors and warnings in C#?



    C. line
  8. Which of the following method helps in returning more than one value?



    C.  Output parameters
  9. Which of the following variable types can be assigned a value directly in C#?



    A. Value types
  10. Which of the following property of Array class in C# checks whether the Array is readonly?



    B.  IsReadOnly
  11. Which of the following is correct about params in C#?
    A. By using the params keyword, a method parameter can be specified which takes a variable number of arguments or even no argument.

    B. Additional parameters are not permitted after the params keyword in a method declaration.

    C. Only one params keyword is allowed in a method declaration.

    D. All of the above.
    D - All of the above.
  12. Which of the following is the correct about class member variables?

    A. Member variables are the attributes of an object (from design perspective) and they are kept private to implement encapsulation.

    B. These private variables can only be accessed using the public member functions.

    C. Both of the above.

    D. None of the above.
    C. Both of the above.
  13. Which of the following property of Array class in C# gets the rank (number of dimensions) of the Array?



    A.  Rank

    Rank gets the rank (number of dimensions) of the Array.
  14. Which of the following access specifier in C# allows a class to expose its member variables and member functions to other functions and objects in the current assembly?




    B. Internal

    Internal access specifier allows a class to expose its member variables and member functions to other functions and objects in the current assembly.

    • // String Variable declared as internal 
    • internal string name;
Author
geschw66
ID
334370
Card Set
C Sharp (C#) questions (MULTIPLE CHOICE) from tutorialspoint.com
Description
C# Test questions from tutorialspoint.com.
Updated