University of Mumbai 2005 B.Sc Information Technology TY - C SHARP - Question Paper
Q one is cumplosory
Solve four ques. from Q2 to Q 7
marks 100
Duration three hours
W-IIKMB. CM 0Ct- rRB-3986
( 3 Hours ) [ Total Marks : 100
N.B. : (1) Question No.l is compulsory.
(2) Solve any four from Q. Nos. 2 to 7.
(3) All questions carry equal marks.
Ql) Write short notes on the following (any five) 20
a) Eight differences between C++ & c#
.b) .NET framework
c) Data types in c#
d) Boxing & unboxing
e) variable size array
f) Difference between structures & classes
g) Abstract methods & classes
Q2) a) Write a program to print the following output 8
1
2 2
3. 3 3
4 4 4 4
5 5 5 5 5
b) What is .NET technology? Describe briefly its origins. 6
c) What is a property. How do we-declare and use it(show a program). 6
Q3) a) Explain regular expression. Write a program that shows the implementation of 8 this.
b) Demonstrate the typical use of the following jump statements 6
break
continue
goto
in a single program
c) Explain Enumeration with example 6
Q4) a) Explain four types of method parameters 8
b) Develop a program that prompts the user to input the name, door number, street, 6 city and pincode and stores them in the address record designed as a structure(with name, door number, street, city and pincode as its members) and display them in an appropriate manner
c) Write the output of the following codes(2 marks cach): 6
i) int m=100, n=300; while(++m<-n)
Console. WriteLine(m);
ii) int m= 100; while(true)
{
if(m<10) break; m=m-10;
Console. WriteLine(m);
iii) int i,j;
for(i=10j=0;i+j>5;i=i-2, j++) Console. WriteLinc("hello");
Q5) a) Write a program to print the following Pascals triangle 1
1 |
1 | ||
1 |
2 |
1 | |
1 |
3 |
3 |
1 |
1 |
4 |
6 |
4 1 |
1 |
5 |
10 |
10 5 |
If we denote rows by i and the columns by j, then any element (except the boundry elements) in the triangle is given, by Pij= Pi-ij-i + Pi-ij
b) Explain the function of each:
Add()
ReverseQ
Contains()
Capacity
RemoveAt()
CopyTo()
c) Write the functionality of try, catch, throw and finally in exception handling
Q6) a) Explain Array List. Write a program that shows the use of array list
b) Explain inclusion polymorphism with example
c) Write a program that accept two double type numbers from the user and displays the addition, subtraction, multiplication, division and modulus of those two numbers.
Q7) a) What is operator overloading. Write a program to add and subtract two complex numbers using operator overloading
b) State what the following statements would accomplish
i) int n = si .Length;
ii) int m = sl..indcxOf(ar);
iii) string s2 = s 1 Jnsert(s 1 .IndexOf(OK), not);
iv) int n = string.Compare(sl,s2,false);
v) Console. WriteLine(sl [5]);
c) 1) What is a readonly member? When and why it is used
2) What is an indexer. What it is used for?
Attachment: |
Earning: Approval pending. |