What is the output of the following program fragment. Choose appropriate data-types of variables to match output.
i=7;j=8;k=9;
printf(ā€œ%dā€,(i+10)%k/j);

Answers

Answer 1

Answer:

1

Explanation:

Given :

i=7;j=8;k=9;

printf(ā€œ%dā€,(i+10)%k/j);

The printf function only displays the result

%d - is used for the display format

However, the actual calculation is in the expression: (i+10)%k/j

Given the variables :

i = 7 ;

j = 8 ;

k = 9 ;

(i + 10) = (7 + 10) = 17

(i + 10) % k = 17 % 9

% = remainder value after division

17 % 9 = (17 / 9) = 1 remainder 8

17 % 9 = 8

Hence,

(i + 10) % k = 8

(i + 10) % k / j

j = 8

8 / 8

= 1


Related Questions

Other Questions
A military leader who seized control of northern India When spices from India and fruit from Chile are sold at grocery stores around North America and Europe, this is an example of which of the following?local food chaindirect marketingone hundred-mile dietglobal food system On 1/1/27, Frankfort Company sold 100 components at $700 each. All sales were cash sales. Estimated total cost servicing the components was $1,300 each year of the three-year-warranty. Frankfort spent $1,400 servicing the components in 2027. This is considered an assurance-type warranty. Using the Expense Warranty approach, what is the 12/31/27 Warranty Liability what is the periodic table elements What does "Communal" Means? And what's a good sentence you can use it? Summarize the following- Belief in One God what is the correct answer ?? two boys decided to share their profits from a car wash job at a ratio of 2:3 how much will each boy receieve if their total profit is 35 Which choice BEST describes what theunderlined metaphor on page 4 suggestsabout speed reading?1. A person who speed reads may imaginethings that are not really in the text. 2. Speed reading is a good way to quickly understand a simple text.3. Speed reading prevents people from fully appreciating a written work.4. A person who reads looks at only a small portion of the words.PAGE 4SpeedReading may allow someone to see the-water's surface but not all -the wondrous.-things that lie beneath.- What does advocate mean?O learnO favorencourageO consumepls hurry Sophie pays m dollars to rent a car for the weekend. On the drive home, she buys $25 worth of gasoline. Her friend Melody pays for one-half the cost of the car rental only. Choose an expression you could use to determine how much Sophie spent. A. m + 25 B. m + 25 1/2 C. 1/2(m + 25) D. 1/2m + 25 If you are near the North Pole in July and are observing the Sun, describe what you would see during a 24-hour period.A. 19N50, 72E2B. 9N2, 72E50C. 2N19, 50E72D. 72N50, 19N2 marys age is 2 upon 3 that of peters age. two years ago marys age was 1 upon 2 of whats peters age will be in 5years time. how old is peter now plzz Sample Response: Amy Tan uses details to show that her family's meal was embarrassing. Her description of her father burping uses imagery because the reader can imagine hearing her father's burp. The guests are astonished, which means they are shocked, because this custom is different. Robert's red face is another description that helps the reader picture him being embarrassed as well. The minister's burp is quiet, and he seems embarrassed by the custom too. Amy says this moment made her silent for the rest of the night, which shows that she is embarrassed.Which details did you include in your response? You can select more than one answer.the detail of Amys father belchinglanguage that appeals to hearing or sightthe guests astonishmentRoberts red facethe ministers quiet belchthe detail of Amys being stunned into silence find the measure of pop songs that you wrote and let me finish them2 or 3 The process by which cells divide is calledAO replicationB.mitosisC.respirationD.photosynthesis HELP PLS FASTT IM ON A TEST AND I DONT EVEN GET THIS Gabriel has a card collection with 32 baseball cards 16 football cards and 24 by basketball cards he wants to arrange the cards in equal piles with only one type of car in each pile how many cards can you put in each pile What is the opposite of negative seven? A fertilizer covers 6 square feet in 2 hours. What is the unit rate?