Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the space provided, answer the following 5 questions. The test is marked out of 20. 1) [5 marks] Answer the following questions either True

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
In the space provided, answer the following 5 questions. The test is marked out of 20. 1) [5 marks] Answer the following questions either True (T) or False (F): a) The do-while and for loops are pre-test loops. b) C# statements are not permitted to span multiple lines. c) Identifier in C# may contain letters, numbers, and any punctations marks. d) int x (9.0% 5); would result in x being assigned 4 e) "R" is stored the same as 'R' in C#. f) All switch statements require a default case. g) The default floating point constant data type is double. h) The left hand side of an assignment statement must be a variable. i) Because the operator performs short-circuit evaluation, your Boolean expression will be evaluated faster if the sub-expression that is most likely to be true is on the left. j) It is not permissible to alter the value of the counter-control variable in a for loop. 2) [3 marks] Convert the following for loop into a while loop. for( int x = 1, int y = 10; xy) if(y>x) Console.WriteLine("Loc 1"); else if(x0) using System; public class Question5 public static void Main

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_2

Step: 3

blur-text-image_3

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions