C#.net test 1

Quiz
•
Computers
•
University
•
Hard
SUNITA YADAV
Used 13+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C# code?
static void Main(string[] args)
{
int a, b, c, x;
a = 80;
b = 15;
c = 2;
x = a - b / (3 c) ( a + c);
Console.WriteLine(x);
Console.ReadLine();
}
78
-84
80
98
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C# code?
m = 5; int y;
y = m++;
y = ++m;
y = 5, m = 6; y = 7, m = 7
y = 6, m = 6; y = 7, m = 6
y = 5, m = 6 ; y = 5, m = 5
y = 5, m = 6; y = 7, m = 8
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be the output of the following C# code?
bool a = true;
bool b = false;
a |= b;
Console.WriteLine(a);
Console.ReadLine();
0
1
True
False
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C# code?
static void Main(string[] args)
{
int a = 5, b = 10;
if (Convert.ToBoolean(Convert.ToInt32(++a)) || Convert.ToBoolean(Convert.ToInt32(++b))) {
Console.WriteLine(a + "\n" + b);
}
else
Console.WriteLine(" C# ");
}
6 11
6 16
6 12
6 10
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C# code?
static void Main(string[] args)
{
char ch = 'p';
switch (ch)
{
case 'p':
Console.WriteLine("coco" + "\t" + Convert.ToInt32(ch));
break;
default:
Console.WriteLine("default");
break;
}
Console.WriteLine("main");
}
coco main
coco 112
coco 112 main
compile time error
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C# code?
static void Main(string[] args)
{
int i = 0;
if (i == 0)
{
goto label;
}
label: Console.WriteLine("HI...");
Console.ReadLine();
}
Hi…infinite times
Code runs prints nothing
Hi Hi
Hi…
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is used to define the member of a class externally?
:
::
#
none of the mentioned
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
0xDebug - Python

Quiz
•
University
15 questions
PYTHON UNIT I MCQS

Quiz
•
University
10 questions
FST Class 2023- Quiz 2

Quiz
•
University
15 questions
Большое Повторение C#

Quiz
•
5th Grade - University
15 questions
JAVASCRIPT.QUIZ

Quiz
•
University
15 questions
Visual Studio Code - DevTools

Quiz
•
University
11 questions
Programming I Quiz 1

Quiz
•
University
15 questions
Quiz 2

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

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

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University