
Programming Concepts Quiz

Quiz
•
Computers
•
University
•
Hard
Harsha Kannuru
FREE Resource
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()
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Quiz Ke 8 alprog if-09

Quiz
•
University
15 questions
Java Arrays Quiz

Quiz
•
University
10 questions
Java Static

Quiz
•
University
6 questions
Unit 13 Function and decision

Quiz
•
University
12 questions
Типы данных Python2

Quiz
•
6th Grade - University
15 questions
python basics

Quiz
•
11th Grade - University
10 questions
Prob. prog 2

Quiz
•
University
10 questions
CR1-Introducción a la Programación con Python

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University