Programming Concepts Quiz

Programming Concepts Quiz

University

10 Qs

quiz-placeholder

Similar activities

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

6-文件操作

6-文件操作

University

10 Qs

1-基本数据类型

1-基本数据类型

University

10 Qs

Listen in Python

Listen in Python

University

10 Qs

Chap 1: What is a program made of?

Chap 1: What is a program made of?

University

13 Qs

POP QUIZ 4 (DFC40243)

POP QUIZ 4 (DFC40243)

University

10 Qs

cp06-01-1D-Array

cp06-01-1D-Array

University

10 Qs

Programming Concepts Quiz

Programming Concepts Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Harsha Kannuru

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following correctly initializes an array of integers with 5 elements?

int[] array = new int[5];

int array = new int[5];

int array = new int[];

int array = new int(5);

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the index of the first element in an array?

0

1

Depends on array type

-1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary difference between a while loop and a do-while loop?

A while loop checks the condition after executing the loop body.

A do-while loop checks the condition before executing the loop body.

A while loop checks the condition before executing the loop body.

A do-while loop does not check any condition.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet? int i = 0; while (i < 3) { Console.WriteLine(i); i++; }

0 1 2

0 1 2 3

1 2 3

1 2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about a do-while loop?

It will execute at least once even if the condition is false.

It will not execute if the condition is false.

It checks the condition before executing the loop body.

It is used only for infinite loops.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following conditions will cause the loop to exit immediately?

while (true)

do {} while (false)

while (1)

do {} while (1)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method would you use to get the length of a string in C#?

str.Size()

str.Length

str.GetLength()

str.Count()

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?