Search Header Logo

Programming in C# Quiz 1

Authored by Omphile Mosingathi

Computers

University

Used 1+ times

Programming in C# Quiz 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable that stores whole numbers in C#?

string number = 5;

int number = 5;

char number = 5;

bool number = 5;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C#, what does Console.ReadLine() return?

An integer

A boolean

A string

A character

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is NOT a valid data type in C#?

float

string

stringInteger

double

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does Convert.ToInt32() do in C#?

Creates a new integer

Converts a string to an integer

Makes numbers bigger

Rounds decimal numbers

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the entry point of a C# program?

The first line of code

The Main() method

The class name

The namespace declaration

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol is used to end most C# statements?

.

:

;

,

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is NOT a type of Windows application in Visual Studio?

Windows Forms

WPF

HTML Forms

Console Application

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?