0% found this document useful (0 votes)
61 views3 pages

2nd Term 2080-c#

Uploaded by

karma220805
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views3 pages

2nd Term 2080-c#

Uploaded by

karma220805
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Pokhariya Ma. Vi.

Biratnagar-03
Second term exam 2080
Sub: C# FM:50
Class: 12 technical PM:20
-----------------------------------------------------------------------------------------------
Group-A
Multiple choice questions. 9x1=9
1. In C#, by default, the default interface methods are _________.
a. virtual
b. sealed
c. private
d. public
2. which operator is used to access variables /fields inside a class in C#?
a. Arrow Operator (->)
b. Dot Operator (.)
c. Greater than (>)
d. Dot and Greater than (.>)
3. To declare an array, define the variable type with____________?
a. Square brackets []
b. Curly brackets {}
c. Round brackets ()
d. None of them
4. what is ‘Console’ in C#?
a. Class
b. Object
c. Method
d. Structure
5. Which datatype is used to store text value in C#?
a. text
b. txt
c. string
d. str
6. What will be the output of the following C# code?
using System;
namespace MyApplication {
class program {
static void Main (strings[] args) {
int a=10, b=20;
Console. WriteLine (“{0}+{1}”,a,b);
}
}
}
a. 20
b. 30
c. 10+20
d. 10+10
7. What is the correct syntax to declare a variable in C#?
a. type variableName =value;
b. type variableName;
c. variableName as type=value;
d. Both (a) and (b)
8. Which is the correct for() statement to run an infinite loop?
a. for(;;;)
b. for(;;);
c. for(;;)
d. for(1;1;1)
9. Which array method is used to sort an array alphabetically or in an ascending order in
C#?
a. Sort()
b. Sorting()
c. Asc()
d. Ascending()
Group B
Give the answer of the following questions [5x5=25]
10. What is C#? Explain the features and applications of C#.
11. Differentiate between WHILE & DO WHILE LOOP with suitable examples of each?
12. compare Class and structures with suitable examples.
13. What is structure and why should we use it in C#? Explain.
14. Define strings? How to create string object in C#? Explain with example.
Group C
Long questions. [2x8=16]
15. Define array with its advantages and disadvantages. WAP in C# to implement multi-
dimensional array.
16. What is loop and why should you use it? WAP in C# console to generate the series: 1, 1,
2, 3, 5, 8,………………….up to 15th term.
-----------------------------best of luck-------------------------

You might also like