C# Quiz

C# Quiz

University

13 Qs

quiz-placeholder

Similar activities

FOP - CHAPTER 8

FOP - CHAPTER 8

University

10 Qs

Programming Paradigms

Programming Paradigms

University

14 Qs

Evolution and Paradigms of Programming Languages Quiz

Evolution and Paradigms of Programming Languages Quiz

University

10 Qs

OOps test quiz

OOps test quiz

University

10 Qs

JAVA-BootCamp - Day1

JAVA-BootCamp - Day1

University

15 Qs

Java Quiz 4

Java Quiz 4

University

15 Qs

Types of programming language (Low Level/Object Oriented)

Types of programming language (Low Level/Object Oriented)

12th Grade - University

12 Qs

OOP intro quizz

OOP intro quizz

University

10 Qs

C# Quiz

C# Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Darryl Charles

Used 2+ times

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for declaring a variable in C#?

myVariable = int;

int myVariable;

var myVariable;

myVariable = int;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store whole numbers in C#?

float

string

boolean

int

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following expression: 5 + 3 * 2?

16

7

11

10

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write an if statement in C#?

if condition:

if (condition)

if (condition) {

if {condition}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a for loop in C#?

The purpose of a for loop in C# is to execute a block of code only once.

The purpose of a for loop in C# is to execute a block of code in a random order.

The purpose of a for loop in C# is to repeatedly execute a block of code for a specific number of times.

The purpose of a for loop in C# is to execute a block of code indefinitely.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access an element in an array in C#?

array.index

array{index}

array[index]

array[element]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a function and a method in C#?

A function is independent, while a method is associated with a class or an object.

A function is a keyword in C#, while a method is not.

A function can only be used in the main method, while a method can be used anywhere in the program.

A function can only return a single value, while a method can return multiple values.

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?