PracticeQuizVinodJain1

PracticeQuizVinodJain1

University

10 Qs

quiz-placeholder

Similar activities

DEBUG THE CODE

DEBUG THE CODE

University

10 Qs

MindSpace Computers Quiz

MindSpace Computers Quiz

University

10 Qs

Quiz6: Functions

Quiz6: Functions

University

10 Qs

C Programming - Basics 001

C Programming - Basics 001

University

10 Qs

C# Cơ bản

C# Cơ bản

University

15 Qs

Java Bootcamp Day 4

Java Bootcamp Day 4

University

15 Qs

Milking Minds 2 17-01-24

Milking Minds 2 17-01-24

University

15 Qs

JAVA array

JAVA array

12th Grade - University

10 Qs

PracticeQuizVinodJain1

PracticeQuizVinodJain1

Assessment

Quiz

Computers

University

Medium

Created by

Vinod Jain

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of given C# Code

static void Main(string[] args)

{

float f = 12;

int x = f;

Console.WriteLine("{0}", x);

}

(a) 12

(b) 12.0

(c) 0

(d) Syntax Error

A

B

C

D

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of given C# Code

static void Main(string[] args)

{

int f = 12;

float x = f;

Console.WriteLine("{0}", x);

Console.ReadKey();

}

(a) 12

(b) 12.0

(c) 0

(d) Syntax Error

A

B

C

D

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of given C# Code

static void Main(string[] args)

{

Object myBoxed = (Object) 12;

int myVal = myBoxed;

Console.WriteLine("{0}", myVal);

Console.ReadKey();

}

(a) 12

(b) 12.0

(c) 0

(d) Syntax Error

A

B

C

D

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of given C# Code

static void Main(string[] args)

{

Object myBoxed = (Object) 12;

int myUnBoxed = (int)myBoxed;

Console.WriteLine("{0}", myUnBoxed);

Console.ReadKey();

}

12
12.0
0
Syntax Error

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

enum Months

{

January,

February,

March = 6,

April,

May,

June,

July

}

static void Main(string[] args)

{

int myNum = (int)Months.June;

Console.WriteLine("{0}", myNum);

Console.ReadKey();

}

(a) 6

(b) 7

(c) 8

(d)None of these

A

B

C

D

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of given C# Code

static void Main(string[] args)

{

string str = "Happy";

for (int i = 0; i <str.Length; i=i+2)

Console.Write("{0}", str[i]);

Console.ReadKey(); Console.ReadKey();

}

Hap
Happy
Hpy
None of these

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of given C# Code

public static void Main(string[] args)

{

int[] arr = new int[5];

arr[0] = 1;

arr[2] = 2;

arr[4] = 3;

for (int i = 0; i < arr.Length; i++)

Console.Write(arr[i]);

Console.ReadKey();

}

123
10203
01020
None of these

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?