1234afrozjahan1234 1234afrozjahan1234
  • 19-08-2020
  • Computers and Technology
contestada

ternary operators of computer

please explain. ​

Respuesta :

GrandNecro
GrandNecro GrandNecro
  • 19-08-2020

Answer:

It's a compact way of doing an if-else statement.

General Format is

<condition> ? <if condition is true> : <else>;

Example:

I could rewrite:

  if(a==1) temp = 1;

  else     temp = 999;

as

  temp = (a==1) ? 1 : 999;

Answer Link

Otras preguntas

1.List 2 examples of positive feedback loop in you body 2.List 2 examples of negative feedback loop in your body
what is full form of sstr
summarize the change in Roman government that led to greater equality for plebians in 451 B.C.E. pls help
List who makes up each of the government and what each branch is responsible for legistative executive judaical
Organizing for America is a a. government program funded through the 2009 stimulus bill that provides job training for unemployed Americans. b. 501(c)(4
if a wave were nine feet high how much would the amplitude be?
In a wave, what is the distance from crest to crest or from trough to trough Amplitude Crest Wavelength Frequency
How do you factor a rounded decimal?
Erin buys a bag of peanuts that weighs 3/4 of a pound.later that week the bag is 2/3 full how much does the back of peanuts weigh now? show your work plz.
At a particular academically challenging high school, the average gpa of a high school senior is known to be normally distributed. after a sample of 20 seniors