Вы находитесь на странице: 1из 2

Course title: C# Programming & .

NET Course Code: P17IS553


Model Question Paper
UNIT - I Marks
1. a) List out the core features of .NET. 3
b) Explain the following terms:
8
i) CLS ii) CIL iii) Assembly iv) Manifest
c) Explain the basic workflow that takes between source code, a given .NET compiler and
9
mscoree.dll.
2. a) Explain the following, with respect to C# program in command prompt:
i) Compiling Single Source file ii) Compiling Multiple Source files 10
iii) Response Files iv) Generating Bug report
b) Illustrate the use of /noconfig flag with an example. 4
c) List out any six unique features of Visual Studio. 6
UNIT - II
3. a) Write a C# program in which a method accepts two arguments as parameters from the user and
6
returns four output values as add, sub, mul and division operations on arguments.
b) Write a function SearchAndReplace (src, pattern, replace) to replace the ‘pattern’ string with
the ‘replace’ string in the ‘src’ string, if found, else leave ‘src’ unaltered. Use only 6
System.String members.
c) Differentiate between Value Types and Reference Types. 8
4. a) Explain the role of constructors with a C# program. 5
b) What is encapsulation? Explain the two ways of enforcing encapsulation with an example
10
for each.
c) Explain the need of static fields with an example. 5
UNIT - III
5. a) With a C# program to compute the area of triangle and rectangle for the following hierarchy
illustrate polymorphism.

10

b) Explain any five members of System.Object with a C# program. 10


6. a) Explain the following terms with an example for each:
6
i) Errors ii) Bugs iii) Exceptions
b) Develop a method that would sort an array of integers. Incorporate exception handling
mechanism for “index out of bounds” situation. Develop a main program that employs this 10
method to sort a given set of integers.
c) Write any four differences between System-Level Exceptions and Application-Level
4
Exceptions.
UNIT - IV
7. a) Define Interface. Explain the three different ways of obtaining interface references
10
with example.
b) Explain how to build cloneable objects with a C# program. 10
8. a) Define Collections and briefly explain any four interfaces of System.Collections and any four
9
class types of System.Collections.
b) List any three benefits that generic containers provide over their non-generic counterparts. 3
c) Briefly explain any four interfaces of System.Collections.Generic and any four class types of
8
System.Collections.Generic.
UNIT - V
9. a) Write a complete C# program to compute and display sum, difference, and multiplication of
two numbers by writing appropriate methods which could be called through multicast delegate 10
method of programming.
b) Write a C# program to demonstrate overloading of the following operators:
i) ++ ii) -- 10
iii) + iv) -
10. a) Explain the Garbage Collection optimization process in C#. 6
b) Give the members of System.GC Type and illustrate their purpose with an example. 6
c) Illustrate, how we can build Disposable Objects with a C# program. 8

****

Вам также может понравиться