csharp

csharp

University

10 Qs

quiz-placeholder

Similar activities

Quiz Webinar GNS3

Quiz Webinar GNS3

10th Grade - University

13 Qs

Pythonintro

Pythonintro

University

15 Qs

cp06-01-1D-Array

cp06-01-1D-Array

University

10 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

1-基本数据类型

1-基本数据类型

University

10 Qs

8 - Организация работы в AutoCAD

8 - Организация работы в AutoCAD

University

13 Qs

BÀI 16 - THUẬT TOÁN SẮP XẾP

BÀI 16 - THUẬT TOÁN SẮP XẾP

9th Grade - University

15 Qs

Gli indirizzi IP

Gli indirizzi IP

9th Grade - Professional Development

15 Qs

csharp

csharp

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

kalyani boyina

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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 + ", "); } } }

1, 11, 21
11, 11, 21
11, 1, 11
21, 1, 21

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 ] + " "); } } } }

5 10 15 20 25
1 2 3 4 5
0 0 0 0 0
10 20 30 40 50

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?

  1. ++a++;

  2. a += 1;

  3. a ++ 1;

  4. a = a +1;

  5. a = +1;

a++ + 1;
a = a++;
a += 1; a = a + 1;
a = a + 2;

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);

150 75
163 92
200 100
120 60

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; }

10 11 12 13 14 15 16 17 18 19
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9

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; }

20 16 12 8 4 0
20 16 12 8 4 0 -4 -8
20 16 12 8 4
20 16 12 8 4 0 -4

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?