What will be displayed after the following statements execute? int funny = 7, serious = 15; funny = serious 2; if (funny != 1) funny- 0; serioos = Q; else if (funny 2) funny = 10; serious = 10; else funny= 1; serious 1: cout << funny <<" " << serious << endl: O None of these O 7 15 O10 10 O1 1

Respuesta :

Answer:

The correct option is 1 1.

Explanation:

As the code is not visible here, the question is attached herewith.

  1. The variable funny and serious are initialized with values 7 and 15 respectively.
  2. In the next step funny is assigned with value of 15 %2 = 1 , Therefore funny=1.
  3. In the if statement funny!=1, which means 1!=1 which is false. Therefore if statements fails to execute.
  4. The next block is else if statement ,funny==2 which means 1==2 ( 1 equal to 2) which is false. Therefore else if fails.
  5. The else executes because all other conditions failed.
  6. Therefore funny =1 and serious =1 are executed and printed.
  7. Therefore the output is 1 1
Ver imagen danialamin

Answer:

11

Explanation:

ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE