C# and ASP.NET Programming Quiz
Test your knowledge of C# programming language concepts and ASP.NET web development fundamentals.
Questions
If method is marked as protected internal who can access it?
- Access is limited to current assembly
- Access is limited to the containing class or types derived from containing class
- Access is limited to the containing type
- Access is limited to current assembly or types derived from the containing class.
How can you sort the elements of the array in descending order
- By calling ReverseSort()
- By calling SortReverse()
- By calling Descend()
- By calling Sort() and then Reverse() method
Which of following statement correctly declares a 2 dimensional array in c#.
- int[,] myarray
- int[][] myarray
- int[2] myarray
- none of above
Give some examples of generic classes.
- List ,HashSet
- Queue
- Stack
- LinkedList
- All of Above
What is default access modifier for top level class , which are not nested in other classes
- Public
- Private
- Protected
- Internal
What is difference between interface and abstract class
- An abstract class may only contain on complete method
- An interface may contain complete or incomplete method
- A class may inherit several interfaces , A class may inherit only one abstract class.
- A class implementation an abstract class has to implement all methods of abstract class , but same is not required in case of an interface.
- All
Does this code compile? Public interface MyInterface { string MyProp { get; } }
- Yes
- No, because the interface name does not start with 'I'
- No, because MyProp is not declared as public
- No, because interfaces can't contain property declaration
The default type of enum is integer and has default value 1
- True
- False
What is the last stage of the webforms cycle?
- Event Handling
- Page_Load
- Validate
- Page_Unload
What is the size for double data type in c#
- 1 Byte
- 2 Byte
- 4 Byte
- 8 Byte
- 16 Byte
If method is marked as protected internal who can access it?
- Access is limited to current assembly
- Access is limited to the containing class or types derived from containing class
- Access is limited to the containing type
- Access is limited to current assembly or types derived from the containing class.
How can you sort the elements of the array in descending order
- By calling ReverseSort()
- By calling SortReverse()
- By calling Descend()
- By calling Sort() and then Reverse() method
Which of following statement correctly declares a 2 dimensional array in c#.
- int[,] myarray
- int[][] myarray
- int[2] myarray
- none of above
Give some examples of generic classes.
- List ,HashSet
- Queue
- Stack
- LinkedList
- All of Above
What is default access modifier for top level class , which are not nested in other classes
- Public
- Private
- Protected
- Internal
What is difference between interface and abstract class
- An abstract class may only contain on complete method
- An interface may contain complete or incomplete method
- A class may inherit several interfaces , A class may inherit only one abstract class.
- A class implementation an abstract class has to implement all methods of abstract class , but same is not required in case of an interface.
- All
Does this code compile? Public interface MyInterface { string MyProp { get; } }
- Yes
- No, because the interface name does not start with 'I'
- No, because MyProp is not declared as public
- No, because interfaces can't contain property declaration
How does asp.net store session IDs by default?
- In Cache
- Cookies
- In Global variable
- URL Strings
Whst is the name given to the type of assembly that contains localized resources
- Spoke
- Hub
- Sputnik
- Satellite
Web security is very important by default on any website. By default, a .net website is configuesd with which type of authentication?
- Anonymous
- Basic
- Integreted windows authentication
- 1 & 3