C#.net test 1

C#.net test 1

University

10 Qs

quiz-placeholder

Similar activities

GK Quiz

GK Quiz

University

15 Qs

ข้อสอบวิชาการใช้เทคโนโลยีดิจิทัลเพื่อการศึกษา (ชุดที่3)

ข้อสอบวิชาการใช้เทคโนโลยีดิจิทัลเพื่อการศึกษา (ชุดที่3)

University

10 Qs

IT

IT

University

10 Qs

Visual Basic 2010

Visual Basic 2010

8th Grade - University

10 Qs

CS100||MsWord

CS100||MsWord

University

10 Qs

DSA quiz 3 set 1

DSA quiz 3 set 1

University

10 Qs

Python Quiz

Python Quiz

University

15 Qs

Quiz - CSE

Quiz - CSE

University

10 Qs

C#.net test 1

C#.net test 1

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

SUNITA YADAV

Used 13+ 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

1 min • 1 pt

What will be the output of the following C# code?

  1. static void Main(string[] args)

  2. {

  3. int a, b, c, x;

  4. a = 80;

  5. b = 15;

  6. c = 2;

  7. x = a - b / (3 c) ( a + c);

  8. Console.WriteLine(x);

  9. Console.ReadLine();

  10. }

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?

  1. bool a = true;

  2. bool b = false;

  3. a |= b;

  4. Console.WriteLine(a);

  5. Console.ReadLine();

0

1

True

False

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C# code?

  1. static void Main(string[] args)

  2. {

  3. int a = 5, b = 10;

  4. if (Convert.ToBoolean(Convert.ToInt32(++a)) || Convert.ToBoolean(Convert.ToInt32(++b))) {

  5. Console.WriteLine(a + "\n" + b);

  6. }

  7. else

  8. Console.WriteLine(" C# ");

  9. }

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?

  1. static void Main(string[] args)

  2. {

  3. char ch = 'p';

  4. switch (ch)

  5. {

  6. case 'p':

  7. Console.WriteLine("coco" + "\t" + Convert.ToInt32(ch));

  8. break;

  9. default:

  10. Console.WriteLine("default");

  11. break;

  12. }

  13. Console.WriteLine("main");

  14. }

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?

  1. static void Main(string[] args)

  2. {

  3. int i = 0;

  4. if (i == 0)

  5. {

  6. goto label;

  7. }

  8. label: Console.WriteLine("HI...");

  9. Console.ReadLine();

  10. }

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

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?