C# Programming Mock Exam 2.2

C# Programming Mock Exam 2.2

University

44 Qs

quiz-placeholder

Similar activities

Latihan 1 PBO XI RPL 2

Latihan 1 PBO XI RPL 2

10th Grade - University

40 Qs

Quiz on C Operators

Quiz on C Operators

University

49 Qs

PRF192-fe-fa24

PRF192-fe-fa24

University

45 Qs

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

40 Qs

Tema 4 Programación Básica

Tema 4 Programación Básica

University

40 Qs

Arrays and ArryList

Arrays and ArryList

University

40 Qs

Exception in Java

Exception in Java

University

41 Qs

PAS INFORMATIKA 11 MIPAS

PAS INFORMATIKA 11 MIPAS

11th Grade - University

40 Qs

C# Programming Mock Exam 2.2

C# Programming Mock Exam 2.2

Assessment

Quiz

Computers

University

Hard

Created by

Penny Kokkali

FREE Resource

44 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following operators is used to check if two values are equal in C#?

!=

==

=

>=

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following C# code when dividing two integers? int x = 8; int y = 3; Console.WriteLine(x / y);

2

2.666

3

An error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid looping construct in C#?

for

until

while

do-while

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid variable name in C#?

varName

int_123

123var

myVariable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a for loop, what is the purpose of the increment section?

To set the initial value of the loop counter

To update the loop counter

To specify the condition for loop termination

To declare and initialize the loop counter

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which C# data type should you use for a variable with large decimal values by default?

double

char

decimal

int

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if an exception is caught in C#?

The program continues running

The program crashes

The exception is ignored

The system recovers automatically

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?