
csharp

Quiz
•
Computers
•
University
•
Hard
kalyani boyina
Used 4+ times
FREE Resource
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
Similar Resources on Wayground
6 questions
Array 2: Unit 8

Quiz
•
University
14 questions
Array output

Quiz
•
University
15 questions
Preliminary Round

Quiz
•
University
15 questions
Milking Minds 2 17-01-24

Quiz
•
University
15 questions
C programming

Quiz
•
University
15 questions
C# Cơ bản

Quiz
•
University
10 questions
RVS_Tech_quizz_even2024-25

Quiz
•
University
10 questions
Rapid Round 2

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
9/11 Experience and Reflections

Interactive video
•
10th - 12th 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
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University