
csharp
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
kalyani boyina
Used 7+ times
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 will be the correct output for the C#.NET program given below?
namespace IndiabixConsoleApplication {
class SampleProgram {
static void Main(string[] args) {
int num = 1; funcv(num);
Console.Write(num + ", ");
funcr(ref num); Console.Write(num + ", "); }
static void funcv(int num) {
num = num + 10;
Console.Write(num + ", "); }
static void funcr (ref int num) {
num = num + 10;
Console.Write(num + ", "); } } }
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the C#.NET code snippet given below?
namespace ConsoleApplication {
class SampleProgram {
static void Main(string[] args) {
int[]arr = newint[]{ 1, 2, 3, 4, 5 };
fun(ref arr); }
static void fun(ref int[] a) {
for (int i = 0; i < a.Length; i++) {
a[i] = a[i] * 5;
Console.Write(a[ i ] + " "); } } } }
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following are the correct ways to increment the value of variable a by 1?
++a++;
a += 1;
a ++ 1;
a = a +1;
a = +1;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the C#.NET code snippet given below?
byte b1 = 0xF7;
byte b2 = 0xAB;
byte temp;
temp = (byte)(b1 & b2);
Console.Write (temp + " ");
temp = (byte)(b1^b2);
Console.WriteLine(temp);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following C#.NET code snippet will print?
int i = 0, j = 0;
label: i++;
j+=i;
if (i < 10) {
Console.Write(i +" ");
goto label; }
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct output for the C#.NET program given below?
int i = 20 ;
for( ; ; ) {
Console.Write(i + " ");
if (i >= -10) i -= 4;
else break; }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication {
public enum color { red, green, blue };
class SampleProgram {
static void Main (string[ ] args) {
color c = color.blue; switch (c) {
case color.red: Console.WriteLine(color.red);
break;
case color.green: Console.WriteLine(color.green);
break;
case color.blue: Console.WriteLine(color.blue); break; } } } }
red
blue
0
1
Create a free account and access millions of resources
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
13 questions
L1 - Computer Networks
Quiz
•
University
15 questions
DBC CHAPTER 3 - REVISION
Quiz
•
University
10 questions
Web-II-Loop and Function
Quiz
•
University
11 questions
NHÓM 3: XÁC ĐỊNH DỰ ÁN
Quiz
•
University
10 questions
Condicionales en Racket
Quiz
•
University
10 questions
Algorithm analysis: divide & conquer theory
Quiz
•
University
10 questions
Programacion Orientada a Objetos
Quiz
•
12th Grade - University
10 questions
Information systems concepts
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
