Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# Help 1.Which primitive type can hold the largest value? long double float int 2. What is the message that will be printed out after

C# Help

1.Which primitive type can hold the largest value?

long
double
float

int

2. What is the message that will be printed out after executing the following code ?

int x= 2 ,y = 6; if (x>3 && y>=6) Console.WriteLine("Class 1"); else if (x>2 || y>=6) Console.WriteLine(" Class 2");

else

Console.WriteLine(" Class 3");

3. Methods that call themselves are known as recursive methods.

True

False

4.What is the message that will be printed out after executing the following code ?

int x= 2 ,y = 6; if (x>3 && y>=6) Console.WriteLine("Class 1"); else if (x>2 || y>=6) Console.WriteLine(" Class 2");

else

Console.WriteLine(" Class 3");

5. Methods must return at least one value.

True

False

6. Let x be a double. How can you typecast a double into an int? ________

7.Consider the following segment of the code:

int sum=5; for (int n= 1; n< 8;n++) if(n!=5) sum =sum + n;

What is the is the value of sum?

8. Consider the following segment of the code:

int j=5 ,i=8; while (i<10 || j>1) { i++; j--; }

How many times does the loop execute?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

using signal flow graph

Answered: 1 week ago