Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

C# Programming Introduction Quiz

Total questions: 21

Worksheet time: 11mins

Name
Class
Date
1.

What is a programming language?

a)

A spoken language

b)

A way to communicate with computers

c)

A machine

d)

A game

2.

Which of the following is a programming language?

a)

Facebook

b)

Excel

c)

C#

d)

Windows

3.

C# was developed by which company?

a)

Google

b)

Microsoft

c)

Apple

d)

IBM

4.

The file extension for a C# source file is:

a)

.exe

b)

.html

c)

.cs

d)

.txt

5.

Which tool is commonly used to write and run C# programs?

a)

Notepad

b)

Visual Studio

c)

Photoshop

d)

Chrome

6.

Which of the following lines prints text to the screen in C#?

a)

print('Hello');

b)

echo('Hello');

c)

Console.WriteLine('Hello');

7.

Every C# program must have a:

a)

Start() function

b)

Begin() function

c)

Main() method

d)

Program() method

8.

What symbol is used to end a statement in C#?

a)

a) ,

b)

b) .

c)

c) ;

d)

d) :

9.

Which of the following is a correct comment in C#?

a)

// This is a comment

b)

c)

# This is a comment

d)

** This is a comment **

10.

What is the correct syntax to declare an integer variable named age?

a)

age = int;

b)

int age;

c)

integer age;

d)

num age;

11.

What keyword is used to store text in C#?

a)

text

b)

string

c)

word

d)

char

12.

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

a)

2name

b)

first-name

c)

firstName

d)

first name

13.

What is the output of the following code? Console.WriteLine(5 + 3);

(a)  

14.

Which of the following data types can store true/false values?

a)

int

b)

bool

c)

float

d)

char

15.

Which of these is used to take input from the user in C#?

a)

Console.ReadLine();

b)

input();

c)

scanf();

d)

cin >>

16.

Which operator is used for comparison in C#?

a)

=

b)

==

c)

!=

d)

+

17.

Which of these loops is used to repeat a block of code?

a)

a) if

b)

b) switch

c)

c) for

d)

d) case

18.

Which of these symbols is used for single-line comments in C#?

a)

#

b)

//

c)

/* */

d)

--

19.

What does IDE stand for?

a)

Internal Development Execution

b)

Integrated Development Environment

c)

Instant Data Exchange

d)

Interactive Data Editor

20.

What is the correct way to start a C# program?

a)

static void Main(string[] args)

b)

void Main(string[] args)

c)

Main(string[] args)

d)

static Main()

21.

Which of the following is the correct main function declaration in C programming?

a)

program start()

b)

public static void Main()

c)

main()

d)

def main():