Question
Hello I have 7 questions. Thank you 1-For the following code, what value is printed to the user? int x = 10; Console.WriteLine(x++); Question options:
Hello I have 7 questions. Thank you 1-For the following code, what value is printed to the user?
int x = 10;
Console.WriteLine(x++);
Question options:
a- 9
b- 10
c- 11 - wrong
d- 12
2-For the following if statements, what value is printed if x = 8?
if (x<=2)
Console.WriteLine("A");
else {
if (x<=2)
Console.WriteLine("B");
else if (x >= 4)
Console.WriteLine("C");
else
Console.WriteLine("D");
}
Question 8 options:
A
B
C
D- Wrong
3- For the following code, what value is printed to the user?
int x = 10; x++; Console.WriteLine(x)
Options
a- 9
b-10
c-11 -- Wrong
d- 12
4-For the following code, what is the resulting value ofz?
double z; int x = 20; int y = 2; z = (double)x / y;
Options A- 2.00 B-10.00 C-20.00 D- An error
5- Which of the following is a double-selection control statement?
Question options:
A-do...while
B- for
C- if...else
D- if
6- For the following code, what value is printed to the user?
int x = 10;
Console.WriteLine(--x);
Question options:
A- 9
B-10
C-11
D-12 7- The if and if/then/else statements are an example of a __________ structure.
Question options:
a-sequential
b-sequence
c-selection
d- repetition
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started