C#.net test 1

C#.net test 1

University

10 Qs

quiz-placeholder

Similar activities

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

Cha-ching 2

Cha-ching 2

1st Grade - University

8 Qs

HTML

HTML

University

13 Qs

Quiz Praktikum Pemrograman Komputer PFB 115

Quiz Praktikum Pemrograman Komputer PFB 115

University

12 Qs

Jarkom F

Jarkom F

University

10 Qs

Pop Quiz

Pop Quiz

University

14 Qs

Banking Accounts Quiz

Banking Accounts Quiz

12th Grade - University

15 Qs

Components of GIS & Levels/Scales

Components of GIS & Levels/Scales

University

12 Qs

C#.net test 1

C#.net test 1

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

SUNITA YADAV

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

Already have an account?