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
padilas [110]
3 years ago
15

Given the following snippet of code, answer the following two questions based on the code: typedef enum {Sun, Mon, Tue, Wed, Thu

, Fri, Sat} days; days x = Mon, y = Sat; while (x != y) { x++; } y++; printf("x = %d, y = %d", x, y); 1. What value will be printed for variable x? [ Select ] . 2. What value will be printed for variable y? [ Select ]
Computers and Technology
1 answer:
ANEK [815]3 years ago
7 0

Answer:

1) The value of x will be 6.

2) The value of y will be 7.

Explanation:

1) The value of x will be 6.  

The enum values are labeled by default from 1. This means that Sun = 1, Mon = 2, Tue = 3 and so on.  

So, x = Mon = 2 and y = Sat = 6  

x increases up to y = 6 in the while loop.  

and then y also increments by 1.  

2)So the value of y = 7.  

You will need actual printf("Sun") or printf("Mon") for printing the actual text for the enum.

You might be interested in
In cryptocurrency, a block is only considered valid if it has a.
melomori [17]

Answer: Token

Explanation: The token gives proof that it is yours.

3 0
3 years ago
Which of the following job tities is held by a person working at a global food distribution ?
Ksivusya [100]
Hi! Please give me Brainliest! Thanks!
6 0
3 years ago
The secure evidence locker is located at the ____.
olga55 [171]
The data recovery lab

Data recovery can be done in special rooms called data recovery labs. Data that has been salvaged, lost, or inaccessible from removable media or secondary storage can be accessed in a normal way. Recovery of this kind may be required due to the physical damage caused.

 

 

 





5 0
3 years ago
How is a life cycle analysis used to <br> make decisions about technology?​
kumpel [21]
It is used to assess the environmental impacts of a product, process, or activity. i extracts materials through to processing transport use and disposal
4 0
4 years ago
Which of these is a negative effect of computer technology's role in creating
attashe74 [19]

Answer: the line between fake and real is blurred just took the test

3 0
3 years ago
Other questions:
  • Never mind I got it
    8·2 answers
  • Import java.util.scanner; public class sumofmax { public double findmax(double num1, double num2) { double maxval; // note: if-e
    10·1 answer
  • After modifying the /etc/default/grub file, what command should be run to rebuild the grub config files?​
    6·1 answer
  • Which function of InfoSec management encompasses security personnel as well as aspects of the SETA program?
    5·1 answer
  • Explain how the operating system controls the software and hardware on the computer?
    5·1 answer
  • Felicity wants to capture the attention of the regular subway commuters in her area though her print advertisements​
    13·1 answer
  • SummaryIn this lab, you complete a partially prewritten Java program that uses an array.The program prompts the user to interact
    12·1 answer
  • A user calls to complain that her computer is behaving erratically. Some days it functions correctly, and other days, it crashes
    15·1 answer
  • ____ is an example of a set of prewritten classes that allows you to access data stored in a database.
    8·1 answer
  • What are the features of the title bar for the Microsoft word application?​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!