What happens if you try to compile and run this program?
#include
int main(void) {
int i, t[4];
t[3] = 0;
for (i = 1; i >= 0; i--)
ti] =
= -131 ii
prints ("*", +(11);
return 0;

Answers

Answer 1

Your question is poorly formatted

#include <stdio.h>

int main(void) {

int i, t[4];

t[3] = 0;

for (i = 1; i >= 0; i--)

t[i] = t[3] * i;

printf("%d", +t[1]);

return 0;

}

Answer:

It outputs 0

Explanation:

I'll start my explanation from the third line

This line declares an integer variable i and an array of 4 elements of type integer

int i, t[4];

This line initialize the 3rd index element to 0

t[3] = 0;

The next two lines is an iteration;

The first line of the iteration iterates the value of i in descending order from 1 to 0

for (i = 1; i >= 0; i--)

This line of the iteration calculates t[1] as t[3] * i and t[0] as t[3] * i; Since t[3] is 0; both t[1] and t[0] will be 0

t[i] = t[3] * i;

This line prints t[1] which is 0

printf("%d", +t[1]);


Related Questions

To build a user interface that contains graphical components, the components ____. must each be added to a separate panel. must be added directly to a frame component. must be added to a panel that is contained within a frame. must be added to a frame that is contained within a panel.

Answers

Answer:

To build a user interface that contains graphical components, the components must be added to a panel that is contained within a frame.

Explanation:

Which is the right way to give comment if you are using Internet explorer as the browser? a) <!-- My First Webpage --> b) <comment> My First Webpage </comment>

Answers

Answer:

(a) <!-- My First Webpage -->

Explanation:

Comments in programming languages are chunks of texts, written as part of program code, that are not executed as actual code but rather used for making the program code easily readable and understandable. They allow programmers to explain certain lines of a program code.

Every programming language has its own way of representing comments. In HTML - HyperText Markup Language - comments are written between the following tags :

<!--

and

-->

For example, to put the text "My comment goes here" in a comment, we write:

<!-- My comment goes here -->

From the question, the text to be put is:  "My First Webpage". Therefore, we write;

<!-- My First Webpage -->

Which statement is the best description of what a macro can do in Excel 2016? It is a type of formatting users can apply to enlarge the worksheet area. It is a file type that a user can save a workbook as. It is a series of instructions contained in one command that users can apply to automate complex and/or repetitive tasks. It is a recording function that allows you to save worksheets, audio recordings, and videos that are displayed on the screen.

Answers

Answer: It is a series of instructions contained in one command that users can apply to automate complex and/or repetitive tasks

One example would be a macro that goes through a list of numbers and highlights which are duplicates. Say you had the list {1,2,3,3,4,4,4,5}. You could use one color to highlight both 3 and 4 as they repeat themselves. Or you could use different colors to show the different values. With a small list, you could highlight by hand. However, macros are more efficient with larger lists.

Answer:

It is a series of instructions contained in one command that users can execute to automate complex and/or repetitive tasks.

Explanation:

edge 2022

Python Lists and Events: Write a program that generates 8 random scores (between 0 and 100), store them in an array, finds the best score, and then assigns grades based on the following scheme (use loops wherever possible): Grade is A if score >= best – 10 Grade is B if score >= best – 20 Grade is C if score >= best – 30 Grade is D if score >= best – 40 Grade is F otherwise.

Answers

Answer:

import random

scores = []

for i in range(8):

   score = random.randint(0,100)

   scores.append(score)

best_score = max(scores)

letter_grade = ""

for s in scores:

   if s >= best_score - 10:

       letter_grade = "A"

   elif s >= best_score - 20:

       letter_grade = "B"

   elif s >= best_score - 30:

       letter_grade = "C"

   elif s >= best_score - 40:

       letter_grade = "D"

   else:

       letter_grade = "F"

   

   print(letter_grade)

Explanation:

Import the random module

Create an empty list to hold the scores

Create a for loop that iterates 8 times. Inside the loop, create 8 random scores and put them in the scores

When the loop is done, find the best_score using max method

Create another for loop that iterates through the scores. Check each score and set the letter_grade depending on the given conditions.

Other Questions
In golf, a bogey is the ideal score for the hole.TrueFalse The equation x2 6x 27 = 0 when solved is: Physical Units Work in process, beginning 0 Completed and transferred out 89000 Work in process, ending 6000 Materials are added at the beginning of the process. What is the total number of equivalent units for materials during the period? PLEASE HELPthe words school, joy, and sam are all examples of nouns:truefalse A security analyst is performing a BIA. The analyst notes that in a disaster, failover systems must be up and running within 30 minutes. The failover systems must use back up data that is no older than one hour. Which of the following should the analyst include in the business continuity plan?A. A maximum MTTR of 30 minutesB. A maximum MTBF of 30 minutesC. A maximum RTO of 60 minutesD. An SLA guarantee of 60 minutes In a supermarket, a vendor's restocking the shelves every Monday morning is an example of:________a. safety stock replenishmentb. economic order quantitiesc. reorder pointsd. fixed order intervale. blanket ordering Which answers are equivalent to the fraction below? Check all that apply12/16A.1/2 B.6/8 C2/3 D.2/6 E.3/4 F.6/4 You bought one of Bergen Manufacturing Co.s 7.8 percent coupon bonds one year ago for $1,061. These bonds make annual payments and mature twelve years from now. Suppose you decide to sell your bonds today when the required return on the bonds is 4.5 percent. If the inflation rate was 4.4 percent over the past year, what would be your total real return on the investment? Andrea and Helen participated in a donut eating contest. Andrea ate six more than four times the number of donuts that Helen ate. Let d represents the number of donuts Helen ate. Write the expression that gives the number of donuts that Andrea ate. What is radioactive dating?A. A method of determining the age of a fosall based on the amountof certain isotopes that remain in a fossil or rockB. A method of determining the age of a fossil that estimates the ageof the organism at its deathC. A method of determining the age of a fossil based on acomparison to the age of other similar fossilD. A method of determining the age of a fossil that estimates howclosely related various fossilized organisms were A new hockey stick costs $57.00 at the sporting goods store. If there is a 6%sales tax, what is the actual cost of the hockey stick? A food snack manufacturer samples 15 bags of pretzels off the assembly line and weighed their contents. If the sample mean is 9.9 and the sample standard deviation is 0.30, find the 95% confidence interval for the true mean. Which event resulted directly from the growth of railroads in the 19th century?A. More women participated in the workforce.B. Banking practices became fairer to farmers.C. Standardized time zones were created.D. Child labor practices were improved. Geo means what? And Graphein means what? The Department of Housing and Urban Development (HUD) would like to test the hypothesis that the average size of a newly constructed house in 2010 is different from the average size of a newly constructed house in 2000. The following data summarizes the sample statistics for house sizes, in square feet, for both years. Assume that the population variances are equal. 2000 2010 Sample mean 2,180 2,390 Sample size 15 12 Sample standard deviation 300 320 If Population 1 is defined as homes built in 2000 and Population 2 is defined as homes built in 2010, which one of the following statements is true? A. Because the 95 % confidence interval includes zero, HUD cannot conclude that the average size of a newly constructed house in 2010 is different from the average size of a newly constructed house in 2000. B. Because the 95 % confidence interval does not include zero, HUD can conclude that the average size of a newly constructed house in 2010 is different from the average size of a newly constructed house in 2000. C. Because the 95 % confidence interval includes zero, HUD can conclude that the average size of a newly constructed house in 2010 is equal to the average size of a newly constructed house in 2000. D. Because the 95 % confidence interval does not include zero, HUD can conclude that the average size of a newly constructed house in 2010 is not different from the average size of a newly constructed house in 2000. Mrs smith invests 30,000 (some in a 5% account, some in an 8% account). After the year shes earned 2100. How much did she put in each account? PLEASE HELP!! which of the following was not a new business created by the rise of automobile1. Roadside restaurants 2. national parks 3. roadside cabins 4. gas stations PLEASE HELP ME Logan has twice as many contacts in his phone as Marcus. Janet has 8 more then 1/3 of the number of contacts that Marcus has. Marcus has 243 contacts in his phone. How many more contacts does Logan have than Janet? Which situation best illustrates the concept of scarcity?a class designing and selling calendarsa cook learning to be an executive chefa friend buying a copy of a popular DVDa person buying a used car due to limited income what was the reason for the panama canal