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
15 questions
PYTHON BOOTCAMP

Quiz
•
University
10 questions
IOTA : Web Development Bootcamp Quiz 3

Quiz
•
University
15 questions
Web Technology

Quiz
•
University
10 questions
Machine Learning and Python.

Quiz
•
University
15 questions
Google Prof Cloud Network - pt 5

Quiz
•
University
10 questions
Launchpad programming - day 5 morning (JS)

Quiz
•
University
10 questions
collections

Quiz
•
University
15 questions
PROBLEM SOLVING USING R UNIT I MCQS

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade