
csharp
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
kalyani boyina
Used 6+ 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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
9 questions
Rounding Numbers in Python
Quiz
•
University
10 questions
Bài ôn tập 1 Tin học 3
Quiz
•
3rd Grade - University
10 questions
Post Test #4 - Python Fundamental #3
Quiz
•
University
12 questions
Sistemas Operativos
Quiz
•
University
15 questions
Chapter 1: Introduction to Cyber Security
Quiz
•
University
10 questions
java quiz on Encapsulation and Abstraction
Quiz
•
University
12 questions
ロジックテスト (Đề kiểm tra năng lực IT)
Quiz
•
University
10 questions
Python with DataScience
Quiz
•
7th Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th 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
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
