13. What is Math.floor(3.6)? a. 3.0 b. 3 с. 4 d. 5.0 14. Which of the following assignment statements is correct? char c = 'dn'; char e = 100; a. b. char c = 'm'; char e = "100"; с. d. 15. Which of the following are valid identifiers? a. Sfailure b. public с. 988ht d. 8=9 radius

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 7RQ: What is the output of the following code segment?inte=5,f=10;if(eff0) Write(Red); else...
icon
Related questions
icon
Concept explainers
Question

13 to 15

11. What is y after the following statement is executed?
x = -1;
y = (x < 0) ? -2 : 3;
а.
-3
b.
-2
с.
3
d.
e. Illegal expression
12. What is the output of the following code?
boolean even = false;
System.out.println((even ? "true" : "false"));
a. true
b. false
c. nothing
d. true false
13. What is Math.floor(3.6)?
а.
3.0
b.
3
с.
4
d.
5.0
14. Which of the following assignment statements is correct?
char c = 'dn';
char c = 100;
char c = 'm';
a.
b.
с.
d.
char c = "100";
15. Which of the following are valid identifiers?
a.
$failure
b.
public
с.
988ht
d.
8=9
е.
radius
Transcribed Image Text:11. What is y after the following statement is executed? x = -1; y = (x < 0) ? -2 : 3; а. -3 b. -2 с. 3 d. e. Illegal expression 12. What is the output of the following code? boolean even = false; System.out.println((even ? "true" : "false")); a. true b. false c. nothing d. true false 13. What is Math.floor(3.6)? а. 3.0 b. 3 с. 4 d. 5.0 14. Which of the following assignment statements is correct? char c = 'dn'; char c = 100; char c = 'm'; a. b. с. d. char c = "100"; 15. Which of the following are valid identifiers? a. $failure b. public с. 988ht d. 8=9 е. radius
Expert Solution
Step 1

Math.floor(double a) :-  it returns the largest  double value that is less than or equal to the number that is passed and is equal to an integer.

 

 

  char c = 'dn';   :- not a valid statement (unclosed character literal )

char c ="100";  :- not a valid statement "100" this is a string

 

 

public is not valid identifier because it is a keyword

988ht is not a valid identifier identifier is not start with number 

8=9 is not a valid identifier it is an expression

 

 

 

 

 

 

steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,