You are on page 1of 4

10CS761: C# & .

NET
Question Bank
Chapter1:
1. What are the core features of .NET platform?
2. Write a program to compute and display the average of 3 numbers with input taken from the
console.
3. How is C# better than VB, Java and C++.
4. What are the building blocks of .NET platform? Briefly explain the role of CLS,CTS, CLR
and base class libraries.
5. Explain the concept of assembly.What are its contents?
6. What are single file and multifile assemblies?
7. What is the significance of CIL or IL for the execution of any .NET aware language. Use
appropriate language to support your answer.
8. Design a C# method AddInts( ) to add 5 integers that are read from key board. Send the
result and a flag indicating successful addition or an error to the calling program say Main() .
You must use appropriate parameter passing mechanism.
9. Explain the concept of namespaces. List and explain atleast 5 .NET namespaces.
10. How do you access a namespace programmatically.
11. Explain the workflow that takes place between source code, .NET compiler and execution
engine.
12. What are response files ? Why do you require them?
13. How do you use response files.Explain with an example.
14. Which is the default response file ?.
15. Mention the different preprocessor directives that C# supports. Explain each with examples.
16. Write a C# program to sort an array of integers using bubble sort.
17. Give the difference between value types and reference types.
18. Explain with examples the C# operators is, as and typeof.
19. What do you understand by params method of parameter passing. Give an example.
20. Using methods in System.String class design a C# static method which replaces all
occurrences of the word vtu with VTU.
PESIT (BSC)

Course Information

BE. -VIISem

CS

10CS761 4 - 1

21. Design a C# program to design a structure:


22. Student <USN,Name,Mrks,Branch> here, Branch is of type enum, with members<CSE,
ISE,ELNS,EE,IT>. Add appropriate constructor and also a method to hike the marks by 10%
t only CSE students. Show creation of some student objects and the way to call these
methods.
23. Explain boxing and Unboxing with practical examples.
24. Explain the different method access modifiers.
25. Explain the different method parameter modifiers with examples.
26. What are the basic components of object oriented programming and how are they
implemented?
27. Explain the following methods of System.String class with examples.
28. compareTo b) insert c) replace 4) toUpper
29. How is Sytem. String class different from StringBuilder class?
30. Explain with appropriate examples of boxing and unboxing of structures.
31. Explain the concept of resolving name clashes across name spaces.
32. How do you define namespace aliases?
33. What are nested name spaces?
34. Write a C# program for sorting and reversing an array of integers using methods in
System.Array class.
35. Explain with examples constructor call forwarding using self reference.
36. How do you call a base class constructor from a derived class?
37. Explain two ways to enforce encapsulation with examples.
38. Explain the two forms of inheritance with appropriate programs.
39. Explain with examples 1) sealed classes 2) abstract methods
40. What do u understand by exceptions in c#?
41. Write a C# program to Build a custom Exception which raises an Exception when the
argument passed is a negative number.
42. How do u handle multiple exception. Illustrate with an example.
43. Write a program containing a possible exception use a try block to throw it and appropriate
catch block to handle it properly.
44. What are system level Exception and Custom Level Exception?

PESIT (BSC)

Course Information

BE. -VIISem

CS

10CS761 4 - 2

45. What are the 3 approaches of building custom Exception?


46. Explain the concept of finalizing types.
47. Explain in detail garbage collection optimization.
48. When does garbage collection occur. Explain the process of garbage collection.
49. What is versioning of class members?
50. Explain finalization process. How do you build adhoc destruction method?
51. How do you build clonable and comparable objects in C#. Give examples.
52. Design a Linked List class in C# with methods to insert and delete nodes. The list should
have the capability to store any type of data.
53. Write a program that defines and implements an interface.
54. How are interfaces different from Abstract base classes?
55. What are the 3 ways to obtain interface references?
56. What is explicit interface implementation? Explain with examples.
57. Explain the role of IClonable interface with an example.
58. Explain the role of IComparable interface with an example. What is the use of IComparer
interface.
59. Explain the following class types with examples
i) ArrayList ii) Queue iii) stack
60. Explain Single cast and multicast delegates in C# with examples.
61. Draw a C# class to use delegates to sort an int array in ascending or descending order. You
must use the Comparator delegate Concept.
62. Write the steps involved in building a shared assembly under .NET environment.
63. Write a note on events in C#.
64. What are the ways to handle overflow and underflow conditions in C#? Mention the keyword
used.
65. Explain the unsafe code concept with example.
66. Explain the following keywords
1) stackalloc 2) fixed 3) volatile 4) sizeof
67. How you will build a custom indexer. Illustrate with an example.
68. Explain operator overloading in C#.

PESIT (BSC)

Course Information

BE. -VIISem

CS

10CS761 4 - 3

69. Write a C# program to overload equality and comparison operators.


70. What are the problems with Classic COM binaries?
71. What are the logical and physical views of assemblies?
72. Explain in detail characteristics of assemblies.
73. What do you understand by shared assemblies?
74. What are strong names and what is it composed of?
75. Explain C# iteration and control flow constructs with examples.

PESIT (BSC)

Course Information

BE. -VIISem

CS

10CS761 4 - 4

You might also like