Programming Concepts Quiz

Programming Concepts Quiz

University

10 Qs

quiz-placeholder

Similar activities

SCM and Logistics

SCM and Logistics

University

11 Qs

QUIZ TECH EASY ROUND!

QUIZ TECH EASY ROUND!

University

10 Qs

Quiz3_DivideConquer_GreedyApproach

Quiz3_DivideConquer_GreedyApproach

University

10 Qs

Computer and Other Human Inventions

Computer and Other Human Inventions

University

15 Qs

Python with DataScience

Python with DataScience

7th Grade - University

10 Qs

2022-2023 Midterm Quiz PLD

2022-2023 Midterm Quiz PLD

University

10 Qs

Enterprise Applications

Enterprise Applications

University

15 Qs

C Wrapup Quiz Deutsch

C Wrapup Quiz Deutsch

University

12 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?