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
100+20000000 please give answer and win iPhone 11 pro​
Eddi Din [679]

Answer:

20000100

Explanation:

8 0
2 years ago
What method does a GSM network use to separate data on a channel?
Sergeu [11.5K]

Answer: TDMA(Time division multiple access)

Explanation: Time-division multiple access is the method that is used by GSM(Global system for mobile communication) usually for the separation process of the data.It is a way in which a same frequency is shared by different time slots of signal.It has high flexibility and so thus is helpful for the GSM network and provides easy services of division.It divides the data according to the time period slots in a GSM network.

4 0
3 years ago
You are given a 6x8 (6 rows, 8 columns) array of integers, x, already initialized and three integer variables: max, i and j. Wri
Aneli [31]

Answer:

The code is mentioned below.

Explanation:

This code is written in C.

Assuming that an array of 6 by 8 is already initialized and stored in a vector

x[6][8]

which will be called or referred in program by:

x [i] [j]

Alongwith the array the variables i j and max will be initialized as integers.

CODE:

int i,j,max;

max=0;

for(i=0;i<6;i++)

{

for(j=0;j<6;j++)

{

if(max>x[i][j])

max = x[i][j];

}

}

This code will check each and every entry of 6 by 8 array and place the largest value in max.

5 0
3 years ago
An employee at a branch office is creating a quote for a customer. In order to do this, the employee needs to access confidentia
SOVA2 [1]

The employee would access an intranet to maintain security.

6 0
3 years ago
What device is designed specifically to reduce broadcast traffic that passes over a network and to choose the best path for movi
mezya [45]

Answer:

Router        

Explanation:

  • A router is a network device that forwards data packets between networks. Its a network layer hardware device. For example a DSL router that connects to the Internet through an internet service provider.
  • Router is connects at least 2 networks (can be two LANs) and the ISP.
  • Router is used to transfer data from one network to another if both networks use same protocols.
  • It receives data in packets form and forwards the data to another router using a routing table. These data packets can be sent between devices or from devices to the internet.
  • The routing table is used to choose the optimal path for forwarding the packets between the source and destination hosts. Routing table configure the best route a packet can take to reach its destination using routing protocols. A Routing Protocol defines how routers connect with each other and share information that makes them choose routes on a computer network between source and destination. Routing tables can be configured statically (routes are fed manually) or dynamically (routes are updated based on information obtained  from other routers).
  • Router makes sure that the data packets reach right destination instead of being lost within the network and it also strengthen signals before transmitting them.
  • Routers reduce broadcast traffic. They form boundaries between broadcast domains and separate a network into multiple broadcast domains.
  • Router do not broadcast traffic and eliminates the packet when it detects a broadcast address. Routers also stop broadcast messages and don't route a broadcast message between broadcast domains.
6 0
3 years ago
Other questions:
  • What are the two most important network-layer functions in a datagram network? what are the three most important network-layer f
    7·1 answer
  • Using the flowchart diagram, identifythe decision point of this solution?
    6·1 answer
  • What can use so tha the slides can appear?
    13·1 answer
  • Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.
    8·1 answer
  • One common method of converting symbols into binary digits for computer processing is called ASCII​ (American Standard Code of I
    5·1 answer
  • Robert's employer has agreed to pay half the tuition for Robert to complete his college degree. This benefit is known as what?
    7·2 answers
  • What is the benefit of the load balancing logic to end-user?
    15·1 answer
  • 25 points select 3 options!!!!!!!!!!!!!!!!!!!!!!!!!
    5·2 answers
  • How to check if students viewed an assignment canvas.
    13·1 answer
  • Which tool can you use to display hardware utilization statistics that tell you about the operation of your computer?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!