What is the output of this code?
int i;
for (i = 1; i < 9; i++) {
if (i % 2 != 0) {
continue;
}
if (i % 3 == 0) {
break;
}
}
Console.WriteLine(i);
1 - KickStart C#
Quiz
•
Professional Development
•
Professional Development
•
Hard
David Santafe
Used 6+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
int i;
for (i = 1; i < 9; i++) {
if (i % 2 != 0) {
continue;
}
if (i % 3 == 0) {
break;
}
}
Console.WriteLine(i);
6
4
7
5
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
int x = 16;
int y = 3;
x %= y * 2;
Console.WriteLine(x++);
3
4
7
5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
class P {
public string N1 {
get {
return "Jen";
}
set {}
}
}
static void Main(string[] args) {
P p = new P();
p.N1 = "Bob";
Console.WriteLine(p.N1);
}
Exception
Jen
Bob
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
//What is the output of this code?
class Person {
public string name {
get;
set;
}
public string country {
get;
set;
}
public Person() {
name = "Petar";
country = "Bulgaria";
}
}
static void Main(string[] args) {
Person p1 = new Person();
p1.name = "Gosho";
Console.Write(p1.name[2]);
Console.Write(p1.country[4]);
}
pb
eg
sa
ai
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid array declaration containing 3 elements?
int a[] = int { 0,0,0 };
int[] a = int[3];
int[] a = new int { 0, 0, 0 };
int[] a = new int[3];
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following operator returns the size of a data type in C#?
typeof
set
get
sizeof
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
int a = 1,
b;
b = increase(a);
Console.WriteLine(a);
0
1
3
2
10 questions
Day17_Quiz_NBKR
Quiz
•
Professional Development
14 questions
Fundamental Python
Quiz
•
Professional Development
13 questions
Quiz JC ( By Jojo 5 )
Quiz
•
Professional Development
9 questions
PreTrainingJavaScript
Quiz
•
Professional Development
15 questions
C Operators
Quiz
•
University - Professi...
10 questions
DAY 1 - C& C++ Assessment _10th June 24
Quiz
•
Professional Development
15 questions
Javascript basics
Quiz
•
Professional Development
10 questions
Super 15 MERN Stack
Quiz
•
Professional Development
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
12 questions
Multiplying Fractions
Quiz
•
6th Grade
30 questions
Biology Regents Review #1
Quiz
•
9th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function
Quiz
•
9th - 12th Grade