Professional Documents
Culture Documents
C# Quiz Results: W3schools
C# Quiz Results: W3schools
C# Quiz Results: W3schools
w3schools.com LOG IN
C# Quiz Results
Score: 22 of 25
88% Correct:
Question 1:
What is a correct syntax to output "Hello World" in C#?
System.out.println("Hello World");
Question 2:
C# is an alias of C++
True
Question
HTML 3: CSS MORE EXERCISES
# This is a comment
/* This is a comment
Question 4:
Which data type is used to create a variable that should store text?
myString
str
Txt
Question 5:
How do you create a variable with the numeric value 5?
num x = 5
double x = 5;
x = 5;
Question 6:
How do you create a variable with the floating number 2.8?
HTML CSS MORE EXERCISES
byte x = 2.8
int x = 2.8D;
int x = 2.8;
Question 7:
Which property can be used to find the length of a string?
getLength()
length
Question 8:
Which operator is used to add together two values?
The * sign
Question 9:
The value of a string variable can be surrounded by single quotes.
False HTML CSS MORE EXERCISES
Your
answer
True
Question 10:
Type casting is when you assign a value of one data type to another type.
False
Question 11:
Which operator can be used to compare two values?
><
<>
Question 12:
To declare an array in C#, define the variable type with:
()
{}
Question
HTML 13: CSS MORE EXERCISES
Question 14:
How do you create a method in C#?
myMethod[]
(MyMethod)
MyMethod.
Question 15:
How do you call a method in C#?
myMethod[];
MyMethod;
Question 16:
Which keyword is used to create a class in C#?
class HTML CSS MORE EXERCISES
Your
answer
MyClass
class()
className
Question 17:
What is the correct way to create an object called myObj of MyClass?
Question 18:
In C#, it is possible to inherit fields and methods from one class to another.
False
Question 19:
What is the name of the 'special' class that represents a group of constants?
const
Question 20:
Which operator is used to multiply numbers?
Question 21:
Which access modifier makes the code only accessible within the same class?
final
abstract
public
Question 22:
How do you start writing an if statement in C#?
if x > y then:
if x > y:HTML CSS MORE EXERCISES
Question 23:
How do you start writing a while loop in C#?
while x > y {
x > y while {
while x > y:
Question 24:
Which keyword is used to return a value inside a method?
get
void
break
Question 25:
Which statement is used to stop a loop?
stop
exit
returnHTML CSS MORE EXERCISES
I
20
2
FI
ED
.
LIKE US
Get certified
by completing
a course today!
school
w3 s
1
CE
02
TI 2
R
FI .
ED
Get started
HOW TO
Tabs
Dropdowns
Accordions
Side Navigation
Top Navigation
Modal Boxes
Progress Bars
Parallax
Login Form
HTML Includes
Google Maps
Range Sliders
Tooltips
Slideshow
HTML CSS MORE
Filter List
EXERCISES
Sort List
Certificates
HTML
CSS
JavaScript
Python
SQL
PHP
And more
Winnit
Answer questions,
Win prizes
Do you want to win cash, its simple
play the game and be the winner!
Open
REPORT ERROR
FORUM
ABOUT
SHOP
HTML CSS MORE EXERCISES
Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W3.CSS Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples
Web Courses
HTML Course
CSS Course
JavaScript Course
SQL Course
HTML CSS MORE Python Course EXERCISES
jQuery Course
PHP Course
Bootstrap Course
XML Course
Get Certified »
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials,
references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While
using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.