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
Bingel [31]
2 years ago
6

Assume that an int variable is Quadrilateral has been declared, and that another int variable, number Of Sides has been declared

and initialized. Write a statement that assigns the value 1 if number Of Sides is exactly 4 and 0 otherwise.
Computers and Technology
1 answer:
kondor19780726 [428]2 years ago
4 0

Answer:

The answer to this question can be given as:

Statement:

isQuadrilateral = (numberOfSides == 4) ? 1 : 0;

//check condition using ternary operator.

Explanation:

we know that both(Quadrilateral, numberOfSides) is already declared in the program. So the statement for check condition is (isQuadrilateral = (numberOfSides == 4) ? 1 : 0;). To check this condition we use the ternary operator. In this operator, we also check another condition. The syntax of ternary operator (condition ? value_if_true : value_if_false).In this statement on the lift side we use the variable for check condition and right side we check condition if the value is true it prints 1 else it will print 0.

You might be interested in
Is it possible for the front and rear references in a circular array implementation to be equal?
azamat

Answer:

Yes it is possible for the following cases:-

  1. When the queue is full.
  2. When the queue is empty.

Explanation:

When the queue is full the the front and the rear references in the circular array implementation are equal because after inserting an element in the queue we increase the rear pointer.So when inserting the last element the rear pointer will be increased and it will become equal to front pointer.

When the queue is empty the front and rear pointer are equal.We remove an element from queue by deleting the element at front pointer decreasing the front pointer when there is only one element and we are deleting that element front and rear pointer will become equal after deleting that element.

7 0
2 years ago
What is the meaning of web browser
anastassius [24]
Is that a joke... if ain't cheatin you repeatin
8 0
2 years ago
Which of the following has likely attended vocational school?
JulsSmile [24]

C- A graphic designer is the awnser

7 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
Alekssandra [29.7K]

Answer:

kinesthetical

Explanation:

please give brainliest please and good luck :)

8 0
1 year ago
Nila has created a report, and now she would like to a create table of contents. Nila has reviewed her report and decides to add
Alenkinab [10]

Answer:

The answer is "heading"

Explanation:

Headings, which appear into your document must be marked simply, objectively and correctly because it shows the final report structure and enable to easy access with specific information.  

  • It also promotes to read the document. So, its consistency is ensured in the headings.
  • In sort documents, it can't require any heading, but it Nila created a report, in which she requires  heading and then she update the content of the tables, and other choices can't be described in the given scenario, that's why it is correct
5 0
3 years ago
Other questions:
  • Format Painter cannot be used to copy only character attributes. True or False
    12·1 answer
  • Your friend, who is a little computer phobic, is going to create his first web page, and he asks you to recommend some software
    13·1 answer
  • Which protocol can be used to send ipv6 packets over an ipv4 network?
    5·1 answer
  • Why laptop computer is called micro computer?​
    8·1 answer
  • Should organizations fear websites where consumers post negative messages about products or services? What actions can companies
    12·1 answer
  • Which statement describes the relationship between science and technology?
    13·2 answers
  • Write a function, called valFrequency, that given a list of values as a parameter, counts the frequencies for each value in the
    14·1 answer
  • 4. When working at the CLI in Linux, you specify the exact location of a file, which is the ____________________ to it, by begin
    13·1 answer
  • Write the importance of program in computer​
    9·1 answer
  • In two-dimensional arrays, the _____________ is always listed second.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!