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
antiseptic1488 [7]
3 years ago
7

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

unny- 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

Computers and Technology
2 answers:
lys-0071 [83]3 years ago
7 0

Answer:

11

Explanation:

svp [43]3 years ago
4 0

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

You might be interested in
Why does the Asian region have the highest number of Internet users?
erica [24]
Although Asia has the most poverty, it also has the most population. Hope this helps!
4 0
3 years ago
Read 2 more answers
Consider the following code: x=random.randint (1, 100) The randint is a ____.​
Mrrafil [7]
Random integer, in this case betweeen 1 and 100
5 0
3 years ago
Which of the following is NOT a way to build on your strengths?
N76 [4]

Answer: the answer is B

Explanation: You can't raise your strengths if you only do sports you are good at:)

8 0
3 years ago
Read 2 more answers
A structure, in C, has been given by: struct MYSTRUCT { char buf[15] shorts S int i; } * Select the proper keywords in the prope
vodka [1.7K]

Answer:

MYSTRUCT myStruct[8]; // statemnt to create an array of struct variables

myStruct[3].buf[4] // statement to access the fourth element of the array of the struct variables.

struct * MYSPTR = &myStruct; // This statement creates a pointer.

To dereference and access the S variable of the struct data structure in the array;

(*MYSPTR).S and its shorthand notation MYSPTR -> S

Explanation:

A structure is a data structure in C language that is used to hold descriptive data of an object. The keyword struct is used to create the structure. An array of struct holds instances of a struct variable, where each struct can be accessed using the regular array indexing and the variables of the structs in the array can be accessed using dot notation.

7 0
3 years ago
Design and implement a structured program for manipulating arrays data structures, as follow:
tekilochka [14]

#include <stdio.h>

struct student {

char firstName[50];

int roll;

float marks;

} s[5];

int main() {

int i;

printf("Enter information of students:\n");

// storing information

for (i = 0; i < 5; ++i) {

s[i].roll = i + 1;

printf("\nFor roll number%d,\n", s[i].roll);

printf("Enter first name: ");

scanf("%s", s[i].firstName);

printf("Enter marks: ");

scanf("%f", &s[i].marks);

}

printf("Displaying Information:\n\n");

// displaying information

for (i = 0; i < 5; ++i) {

printf("\nRoll number: %d\n", i + 1);

printf("First name: ");

puts(s[i].firstName);

printf("Marks: %.1f", s[i].marks);

printf("\n");

}

return 0;

}

#◌⑅⃝●♡⋆♡Nåmřāthā ♡⋆♡●⑅◌

6 0
2 years ago
Other questions:
  • #TODO: Define a data structure to keep track of which links are part of / not part of the spanning tree.
    14·1 answer
  • After class, Anita and Bev make plans to study for their psychology exam together but cannot decide on a time or location. In ad
    14·1 answer
  • Write code that read from variables N and M, multiply these two unsigned 32-bit variables and store the result in Variables P, Q
    11·1 answer
  • Plzzz help! It’s due soon and I can’t figure it out
    13·1 answer
  • In 2011 a program named Watson running on an IBM supercomputer
    12·1 answer
  • Write a filter that reads in a sequence of integers and prints the integers, removing repeated values that appear consecutively.
    5·2 answers
  • Electricity fact topic
    10·2 answers
  • Image-editing software is used to_____
    7·1 answer
  • How do programmers recognise patterns, generalise and abstract information
    13·1 answer
  • How can IT infrastructure be linked to the business strategy of any organization
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!