Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C# and Programming Questions I will rate Thumbs up 1. Many programming languages

ID: 3910389 • Letter: C

Question

C# and Programming Questions

I will rate Thumbs up

1. Many programming languages facilitate programming in more than one paradigm.

A.True

B.False

2.Markdown supports code blocks where code can be presented with its formatting maintained.

A.True

B.False

3. Use whitespace to make the code more readable by putting each element on its own line in an html document.

A. True

B. False

4. Given the following C# code, what is the value of cost after the lines execute?

int quantity = 20;
var cost = quantity < 10 ? 19.95 : quantity * 1.79;

A. 19.95

B. 35.8

C. 37.85

D. 39.9

5.Which of the following is the correct way to create a C# array?

A. String[] colors = ["red", "green", "blue"];

B. String[] colors = ["red", "green", "blue"]();

C. String[] colors = new["red", "green", "blue"];

D. String[] colors = new[] { "red", "orange", "yellow" };

Explanation / Answer

1.True.

Programming language like c++,python used more than one programming paradigm such as OOP ,Procedurel programming.

2.True

3.True

Using white we can make the code more readable. Which will help in debugging or others will also understand our code easily.

4. B. 35.8

In the code snipet they uses a ternery operator. Suntax is below.

So in ternery operator first the conditional expression is evaluted. If it is true then the first statement will be returned or if the expression is false then second statement will returned(executed).

so in the above example since quantity(20) is not less than 10 so condition false so the second statement will be executed.

5. A. String[] colors = ["red", "green", "blue"];