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
adelina 88 [10]
3 years ago
10

What will be displayed after the following statements execute? int funny = 7, serious = 15; funny = serious % 2; if (funny != 1)

{ funny = 0; serious = 0; } else if (funny == 2) { funny = 10; serious = 10; } else { funny = 1; serious = 1; } cout << funny << " " << serious << endl;
Computers and Technology
2 answers:
Reika [66]3 years ago
8 0

Answer:

1 1

Explanation:

First we have funny = 7 and serious = 15 .Then after that remainder when serious is divided by 2 is stored in funny that is 1.if condition will be false because funny is equal to 1.else if condition will also be false because it is not 2.So else will be executed and funny =1 and serious =1.

Output=1 1

alina1380 [7]3 years ago
6 0

Answer:

11

Explanation:

your welcome!

You might be interested in
Safety glasses should be worn in which of the following situations?
N76 [4]
When any substance is being heated. Safety glasses
8 0
2 years ago
Consider the following JavaScript program:
dem82 [27]

Answer:

Variable       Where Declared

In Sub1 :

        A        Sub1

        Y        Sub1

        Z        Sub1

        X        Main

In Sub2:

        A        Sub2

        B        Sub2

        Z        Sub2

        Y        Sub1

        X        Main

In Sub3 :

        A        Sub3

        X        Sub3

        W       Sub3

        Y        Main

        Z        Main

Explanation:

In static-scoped languages with nested subprograms, the declaration of a variable is checked with the subprogram, if it is not found, it check within the parent method that called it, it continue until it find a declaration, if no declaration is found, it display an error.

In Sub1, a, y, z is declared there while the declaration of x is found in main.

In Sub2, a, b, z is declared, declaration of y is found in sub1 and declaration of x is found in main.

In Sub3, a, x, w is declared while the declaration of y, z is from the main.

7 0
3 years ago
2.
BaLLatris [955]

Answer:

B. i < list.length

Explanation:

This question is terribly worded, but I assume the meaning is which answer will not result in an error if it's used in the while condition of the for loop.  The correct answer is b.  i < list.length is telling the loop to continue as long as the variable i is less than the length of the array list.

Answers C and D could potentially be valid under certain circumstances, but very unusual.  Answer A will give an error as list[list.length] will give an undefined value (assuming this is indeed javascript and not some other languge).

4 0
2 years ago
Read 2 more answers
A byte addressable direct-mapped cache has 1024 blocks/lines, with each block having eight 32-bit words. How many bits are requi
tino4ka555 [31]

Answer and Explanation:

"The inquiry as presented is not necessarily responsible. A word has been states as 32-bit. We need to ask if the frame is "byte-addressable" (From this we can access to get an 8-bit piece of information) or "text-addressable" (the smallest open lump is 32-bit) or maybe "half-word-addressable" (the tiny bundle of information it could reach to 16-bit).

To understand what the smallest request bit of a position is to let anyone know, you have to remember this.

You operate from base up at that stage. We will agree with the byte-addressable structure. Every reserved square at a certain point contains 8 words * (4 bytes/word) = 32 = 25 bytes, so the counterbalance seems to be 5 bits.

The history in a direct-mapped stored is the squares in reserves (12 bits for this position due to 212 = 4096). at a certain point, as you have seen, the tag is also one of the bits left behind.

As the reserve becomes increasingly cooperative. And a similar size remains. These are lesser bits on the list and more bits on the mark.'

8 0
3 years ago
Which string method returns true if the character is a numeric character?
S_A_V [24]
The answer is d

letter.isdigit()
8 0
2 years ago
Other questions:
  • A company with a large number of hosts creates three subdomains under a main domain. For easier management of the host records,
    11·1 answer
  • Strong emotions can interfere with your ability to
    15·1 answer
  • PLEASE HELP!! Kou converged his Word document to a PowerPoint document. When he received the PowerPoint, he was missing material
    12·1 answer
  • 19. The power supply in your server has just been replaced because of power problems. Your server boots, but now there is a mess
    13·1 answer
  • A student who used a regression model that included indicator variables was upset when receiving only the following output on th
    10·1 answer
  • Write a program that inputs numbers and keeps a
    8·1 answer
  • You will include code that will validate all user input. If the user inputs an invalid value, the program will respond with an e
    14·1 answer
  • What do I have to do to get you to cancel this subscription? I have emailed several times and every dang month I get a $10 charg
    10·1 answer
  • What are the examples of computer software​
    8·2 answers
  • A user may enter some text and the number of times (up to a maximum of 10) to repeat it. Display the text repeated that many tim
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!