1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lilit [14]
2 years ago
14

What is the result of expression 15 > 10 > 5 in C? What is the result of the same expression in Java?

Computers and Technology
1 answer:
Inessa05 [86]2 years ago
5 0

Answer:

java: error

C: false

Explanation:

In Java the compiler understand that you are trying to compare an integer (15) with a boolean (10 > 5) this generate the next error:

error: bad operand types for binary operator  

In C the compiler convert (15 > 10 > 5) in (15>10) > (10>5) which is equal to TRUE > TRUE, the compiler can also read it as 1 > 1 (since 1 is TRUE and 0 is FALSE).  like 1>1 is false then C program return false.

You might be interested in
Can we update App Store in any apple device. (because my device is kinda old and if want to download the recent apps it aint sho
DIA [1.3K]

Answer:

<h2><em>F</em><em>o</em><em>r</em><em> </em><em>m</em><em>e</em><em> </em><em>y</em><em>e</em><em>s</em><em> </em><em>i</em><em> </em><em>g</em><em>u</em><em>e</em><em>s</em><em>s</em><em> </em><em>y</em><em>o</em><em>u</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>u</em><em>p</em><em>d</em><em>a</em><em>t</em><em>e</em><em> </em><em>a</em><em>n</em><em> </em><em>a</em><em>p</em><em>p</em><em> </em><em>s</em><em>t</em><em>o</em><em>r</em><em>e</em><em> </em><em>i</em><em>n</em><em> </em><em>a</em><em>n</em><em>y</em><em> </em><em>d</em><em>e</em><em>v</em><em>i</em><em>c</em><em>e</em></h2><h2><em>I</em><em>'</em><em>m</em><em> </em><em>n</em><em>o</em><em>t</em><em> </em><em>s</em><em>u</em><em>r</em><em>e</em></h2>

<h2><em>×_× mello ×_×</em></h2>
4 0
3 years ago
Which of the following identifiers are valid? Which are Java keywords?
Yuliya22 [10]
Valid
$4 , apps , miles , x

keywrd:
class , int 

7 0
3 years ago
Are high tech messages are always preferable to low tech messages
Pie
Yes very much so . The correct way to shut off the computer is to a. click stop. b. push the power button on the system unit. c. click start, then run, and then type shut down. d. click start and then shut down.
7 0
2 years ago
Why is friction bad?
allochka39001 [22]
Because it slows down the speed of an object
3 0
3 years ago
Read 2 more answers
What is it called when you give credit in your writing to someone else's quote?
katrin2010 [14]
Answer: citation

There are two basic ways to give credit to another person in your writing.

(a) The use of a signal phrase.
For example, you might write this:
According to John Doe (2005),  Author of "Old Classic Novels", it is necessary to understand  ...

(b) In-Text Citation.
For example, you might write:
It is necessary to understand ... (John Doe, 2005, p. 65-70)

In this case, the reference is provided at the end of the article or as a footnote.

3 0
2 years ago
Other questions:
  • Why do most people share, especially photos online using social media?
    11·2 answers
  • Write a statement that declares a prototype for a function printArray, which has two parameters. The first parameter is an array
    10·1 answer
  • --------------------is a host that runs software to provide information, such as web content, to other hosts.
    9·1 answer
  • \What will the weather most likely be like the day after a warm front? (4 points) The temperature will be cool or cold, and ther
    7·2 answers
  • Write a program segment with a do-while loop that displays whether a user-entered integer is even or odd. The code should then a
    5·1 answer
  • How many address bits are needed to specify each byte in a 512 byte memory unit?
    5·1 answer
  • 4. The Internet may best be compared to a/an A. series of colored lights. B. loud truck motor. C. enormous skyscraper. D. large
    6·1 answer
  • HELLO answer this. Sidney needs to create a decimal number variable that will be added to another number. What kind of variable
    9·2 answers
  • A website for a certain political party or candidate is likely to have unbiased
    6·1 answer
  • What is a document?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!