Question

Given the following enumeration, what is the output from the printf(): enum day { sun, mon,...

Given the following enumeration, what is the output from the printf():

enum day { sun, mon, tue, wed, thu, fri, sat};

enum day d;

d = mon;

prrintf("%d\n", d);

a. mon

b. 1

c. MON

d. 0

0 0
Add a comment Improve this question Transcribed image text
Answer #1
By default, the first enumerator has the value 0

So,
sun is 0
mon is 1

d is mon
So, it prints 1

b. 1

Add a comment
Know the answer?
Add Answer to:
Given the following enumeration, what is the output from the printf(): enum day { sun, mon,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • c++ What is the value of "Wed" given the following: enum DAYS { Sun, Mon =...

    c++ What is the value of "Wed" given the following: enum DAYS { Sun, Mon = 0, Tue = 4, Wed, Thu = 7, Fri, Sat } Select one: a. 10 b. -1 c. 5 d. 6 What returns the number of bytes in a data type or variable? Select one: a. bytesize b. length c. sizeof d. bytes

  • Customer Day Browser Time (min) 12.0 19.5 Pages Viewed Amount Spent (S) Mon Chrome Mon Chrome...

    Customer Day Browser Time (min) 12.0 19.5 Pages Viewed Amount Spent (S) Mon Chrome Mon Chrome Wed Chrome Sun Chrome 54.52 94.90 26.68 44.73 66.27 67.80 36.04 55.96 70.94 68.73 54.04 48.05 64.16 158.51 84.12 59.20 91.62 126.40 Wed Other Tue Firefox Sat Firefox 10.5 Fri Firefox Wed Firefox 12.7 24.7 13.3 Tue Chrome Sat Other Sun Firefox Sun Other Mon Firefox 12 13 24.4 Fri Chrome Thu Chrome Thu Chrome Mon Chrome Fri Other Wed Chrome 18 14.0 15.1...

  • Explain in steps on the following code What would be the output when executed using System;...

    Explain in steps on the following code What would be the output when executed using System; namespace EnumApplication { class EnumProgram { enum Days { Sun, Mon, tue, Wed, thu, Fri, Sat }; static void Main(string[] args) { int WeekdayStart = (int)Days.Mon; int WeekdayEnd = (int)Days.Fri; Console.WriteLine("Monday: {0}", WeekdayStart); Console.WriteLine("Friday: {0}", WeekdayEnd); Console.ReadKey(); } } }

  • A local franchise of a national chain of day-old pastry stores recorded the number of customers that came in to the store for five weeks this fall. The national franchisor states that the percentage o...

    A local franchise of a national chain of day-old pastry stores recorded the number of customers that came in to the store for five weeks this fall. The national franchisor states that the percentage of customers is distributed as follows: Sunday – 20%, Monday – 8%, Tuesday – 6%, Wednesday – 7%, Thursday – 12%, Friday – 22%, Saturday – 25%. The manager doesn’t trust the franchisor and wants to show his store has different percentages. Use a χ² Goodness-of-Fit...

  • A local franchise of a national chain of day-old pastry stores recorded the number of customers that came in to the store for five weeks this fall. These data are recorded in the attached file. The na...

    A local franchise of a national chain of day-old pastry stores recorded the number of customers that came in to the store for five weeks this fall. These data are recorded in the attached file. The national franchisor states that the percentage of customers is distributed as follows:   Sunday – 20%, Monday – 8%, Tuesday – 6%, Wednesday – 7%, Thursday – 12%, Friday – 22%, and Saturday – 25%. The manager doesn’t trust the franchisor and wants to show...

  • #1.A For the full HeavenlyChocolates data set, fil in the wing table (to two decimals) ime...

    #1.A For the full HeavenlyChocolates data set, fil in the wing table (to two decimals) ime PagesAmt Spent Mean Standard Deviation Count Confidence Level( 99.0%) #1.B maintain/reject the null hypothesis that the mean value of Time is 12 min. at the .01 level because #1.C maintain/reject the null hypothesis that the mean value of Amt Spent is $70 at the .01 level because #2-A For the full HeavenlyChocolates data set, fill in the correlation table (to two decimals): Time PagesAmt...

  • Help with Python problem. ###################################### Q3 ############################### dowt = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')...

    Help with Python problem. ###################################### Q3 ############################### dowt = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat') # day-of-week-tuple, # year = 2020 cnt = 3 # 2020/1/1 is a Wednesday, so let us start a counting index of 3 for Wednesday, and keep adding one # m = 3 # this will be a variable to be looped through eventually. I use the convention of 0–11 for the twelve months # # As the cnt value changes, we want to...

  • Code in PYTHON I have a small company. I need a payroll system that calculates the...

    Code in PYTHON I have a small company. I need a payroll system that calculates the pay and taxes for each employee. I have the following input files: • EmployeeData ENum,ELName,EFName,Work Area,HrlyRate 1101,Davis,Mike,7,24.85 1385,Smith,William,1,19.50 1524,White,James,3,23.50 1998,Stuart,Mary,1,25.00 2358,Scott,Richard,4,20.00 2765,Mills,Jason,5,21.00 2945,Schultz,Cindy,7,23.50 4789,Moffett,William,3,30.00 5304,Rangel,Ken,2,28.00 5521,Rodriguez,Teresa,4,29.00 6447,Butler,Craig,2,18.50 6512,Russell,Don,6,26.00 6614,Wilson,Keith,1,28.50 6749,Johnson,Darrell,6,32.00 7325,Butler,Eileen,4,17.00 7886,Williams,Gina,1,21.00 8356,Roberts,Judy,8,23.00 8466,Soto,Glen,8,22.50 9458,Cooper,Lia,4,26.50 9896,Bonds,Lisa,5,27.00 • TaxTable LRange,URange,TaxAmt 0.01,200.00,20.00 200.01,400.00,50.00 400.01,600.00,75.00 600.01,800.00,100.00 800.01,1000.00,120.00 1000.01,1200.00,150.00 1200.01,1400.00,180.00 1400.01,1600.00,220.00 1600.01,1800.00,250.00 1800.01,2000.00,300.00 2000.01,2200.00,325.00 2200.01,2500.00,350.00 starting at zero and ending at 2,500.00. • TimeCardData ENum,Day,DailyHours 1101,FRI,8.00 1101,MON,8.00 1101,THU,8.00...

  • Heavenly Chocolates manufactures and sells quality chocolate products at its plant and retail store located in...

    Heavenly Chocolates manufactures and sells quality chocolate products at its plant and retail store located in Saratoga Springs, New York. Two years ago, the company developed a web site and began selling its products over the Internet. Web-site sales have exceeded the company’s expectations, and management is now considering strategies to increase sales even further. To learn more about the web-site customers, a sample of 50 Heavenly Chocolate transactions was selected from the previous month’s sales. Data showing the day...

  • Will give positive rating! AM/PM Method Assignment # 03: Calculate the early and late dates for the following activiti...

    Will give positive rating! AM/PM Method Assignment # 03: Calculate the early and late dates for the following activities, and create a bar chart. Assuming a Monday to Friday working week and the first activity starting on Dec 01 20XX. 1-Dec Activity A Activity B Activi Activity F Activity G 2 days da 3 da da 2 da Activity C Activity E 3 da 3 da SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY 2 4 Fulil Mocn NW 10 12...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT