C#.net test 1

C#.net test 1

University

10 Qs

quiz-placeholder

Similar activities

X-Quiz #6

X-Quiz #6

University

10 Qs

Chapter 1: Python Overview

Chapter 1: Python Overview

University

10 Qs

Moringa JavaScript Iteration

Moringa JavaScript Iteration

9th Grade - Professional Development

10 Qs

JavaScript

JavaScript

University

11 Qs

Moringa JavaScript Arrays

Moringa JavaScript Arrays

5th Grade - Professional Development

10 Qs

Vetores C# Quiz

Vetores C# Quiz

University

13 Qs

for loops & while loops

for loops & while loops

University - Professional Development

10 Qs

Linux Basics

Linux Basics

University

8 Qs

C#.net test 1

C#.net test 1

Assessment

Quiz

Computers

University

Hard

Created by

SUNITA YADAV

Used 13+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?