wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C# TOPIC NEW-2

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Which of the following is NOT an Editor?

a)

Visual Studio code

b)

Visual Studio

c)

Notepad

d)

None

2.

Which of the following is NOT an Assignment operator in C#.NET?

a)

\=

b)

/=

c)

*=

d)

+=

3.

Method used to convert string to int

a)

Cannot

b)

int.Parse()

c)

Pasrsing(int)

d)

None

4.

Which one is not a valid variable ?

a)

num_11

b)

11num

c)

_num11

d)

newint

5.

Which one is not operator

a)

?:

b)

&&

c)

||

d)

?<

6.

Which of the following are NOT Relational operators in C#.NET?

1. >=

2. !=

3. Not

4. <=

5. <>=

a)

1,3

b)

2,4

c)

3,5

d)

4,5

7.

The correct way to increment value by 1 is

a)

++ a ++

b)

b ++ 1

c)

c+=1

d)

d=+1

8.

Which one is valid variable name

a)

data

b)

1_data

c)

Data-1

d)

Data2@

9.

Which of the following statements is correct about the C#.NET code snippet given below?

int s1 = 20;

int s2 = 400;

int a;

a = s1 * s2;

a)

A value 8000 will be assigned to a.

b)

A negative value will be assigned to a.

c)

During arithmetic if the result exceeds the high or low value of the range the value wraps around till the other side of the range.

d)

An error is reported as widening conversion cannot takes place.

10.

Which of the following is the correct value of a Boolean type?

a)

0

b)

1

c)

True

d)

0.1

11.

Which one is ternary operator in C#

a)

++

b)

>=

c)

?:

d)

<?:>

12.

Which of the following are Logical operators in C#.NET?

1. &&

2. ||

3. !

4. Xor

5. %

a)

1,2,3

b)

2,3,5

c)

3,4

d)

3,4,5

13.

Which of the following is NOT an Arithmetic operator in C#.NET?

a)

**

b)

+

c)

/

d)

%

14.

Which of the following is the correct output for the C#.NET code snippet given below?

Console.WriteLine(13 / 2 + " " + 13 % 2);

a)

6.51

b)

6.50

c)

60

d)

61

15.

Which of the following is not an Integer?

a)

char

b)

long

c)

short

d)

int