
Programming Concepts Quiz
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Harsha Kannuru
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
BACS3323 Chapter 6 - Decision Making - Lecture
Quiz
•
University
10 questions
ARRAYS 1
Quiz
•
University
15 questions
CODE ZENITH
Quiz
•
University
10 questions
Solar System -Pencil 2D
Quiz
•
KG - Professional Dev...
15 questions
IT 209
Quiz
•
University
11 questions
Understanding Image Representation and Compression
Quiz
•
10th Grade - University
10 questions
1ª Recuperação - 3° Trim. - Pensamento Computacional - 9º ano
Quiz
•
9th Grade - University
15 questions
OS-Process scheduling
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
