WorksheetsC# Programming Introduction Quiz
Total questions: 21
Worksheet time: 11mins
What is a programming language?
A spoken language
A way to communicate with computers
A machine
A game
Which of the following is a programming language?
Excel
C#
Windows
C# was developed by which company?
Microsoft
Apple
IBM
The file extension for a C# source file is:
.exe
.html
.cs
.txt
Which tool is commonly used to write and run C# programs?
Notepad
Visual Studio
Photoshop
Chrome
Which of the following lines prints text to the screen in C#?
print('Hello');
echo('Hello');
Console.WriteLine('Hello');
Every C# program must have a:
Start() function
Begin() function
Main() method
Program() method
What symbol is used to end a statement in C#?
a) ,
b) .
c) ;
d) :
Which of the following is a correct comment in C#?
// This is a comment
# This is a comment
** This is a comment **
What is the correct syntax to declare an integer variable named age?
age = int;
int age;
integer age;
num age;
What keyword is used to store text in C#?
text
string
word
char
Which of the following is a correct variable name in C#?
2name
first-name
firstName
first name
What is the output of the following code? Console.WriteLine(5 + 3);
(a)
Which of the following data types can store true/false values?
int
bool
float
char
Which of these is used to take input from the user in C#?
Console.ReadLine();
input();
scanf();
cin >>
Which operator is used for comparison in C#?
=
==
!=
+
Which of these loops is used to repeat a block of code?
a) if
b) switch
c) for
d) case
Which of these symbols is used for single-line comments in C#?
#
//
/* */
--
What does IDE stand for?
Internal Development Execution
Integrated Development Environment
Instant Data Exchange
Interactive Data Editor
What is the correct way to start a C# program?
static void Main(string[] args)
void Main(string[] args)
Main(string[] args)
static Main()
Which of the following is the correct main function declaration in C programming?
program start()
public static void Main()
main()
def main():
