a) Write the output when the following code segments in program 1.1 (Figure 6), program 1.2...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
a) Write the output when the following code segments in program 1.1 (Figure 6), program 1.2 (Figure 7) and program 3 (Figure 8) are executed: //program 1.1. int a-1, b=2, c=3; printf("%d", (! (a>b) && (b<c); Answer: Figure 6 (5 marks) //program 1.2 int a -5, b-10, c-11; x= a*b/--c+5; printf("%d %d\n", --c, x); y3* c++ >= a; printf("%d d\n", c, y); Answer: Figure 7 (5 marks) //program 1.3 int num6234; float weight = 72.658; int abc 65; // ASCII code 65 'A' printf ("6d\n", num 2); printf("3d\n", num 2000); printf ("4.2f\n", weight 1.1); printf ("ke\n", 987.65 +2.1234); printf("%c c c\n", abc, abc 1, abc + 2): printf(" to X\n", printf("I like my s abe +1, abc +2, abc + 3); d\n", "abc", 1953 + abc); Figure 8 Answer: (5 marks) a) Write the output when the following code segments in program 1.1 (Figure 6), program 1.2 (Figure 7) and program 3 (Figure 8) are executed: //program 1.1. int a-1, b=2, c=3; printf("%d", (! (a>b) && (b<c); Answer: Figure 6 (5 marks) //program 1.2 int a -5, b-10, c-11; x= a*b/--c+5; printf("%d %d\n", --c, x); y3* c++ >= a; printf("%d d\n", c, y); Answer: Figure 7 (5 marks) //program 1.3 int num6234; float weight = 72.658; int abc 65; // ASCII code 65 'A' printf ("6d\n", num 2); printf("3d\n", num 2000); printf ("4.2f\n", weight 1.1); printf ("ke\n", 987.65 +2.1234); printf("%c c c\n", abc, abc 1, abc + 2): printf(" to X\n", printf("I like my s abe +1, abc +2, abc + 3); d\n", "abc", 1953 + abc); Figure 8 Answer: (5 marks)
Expert Answer:
Answer rating: 100% (QA)
Program 11 Output 1 a b b c a b means 1 2 That is false b c means 2 3 that is true And operation bet... View the full answer
Related Book For
Applied Regression Analysis and Other Multivariable Methods
ISBN: 978-1285051086
5th edition
Authors: David G. Kleinbaum, Lawrence L. Kupper, Azhar Nizam, Eli S. Rosenberg
Posted Date:
Students also viewed these programming questions
-
Analyze the beam in Figure P10.7. Draw the shear and moment curves. Given: \(E=29,000 \mathrm{ksi}\) and \(I=100\) in. \({ }^{4}\). 20 kip.ft A w = 3 kips/ft B |4| 8 C D
-
In the figure, which of the following are opposite rays? A) Ray AB and Ray CD B) Ray CA and Ray CD C) Ray DA and Ray AD D) Ray CA and Ray BD A B C D
-
(A) If the percent yield for the formation of urea in Example 4-13 were 87.5%, what mass of CO 2 , together with an excess of NH 3 would have to be used to obtain 50.0 g CO(NH 2 ) 2 ? (B) Calculate...
-
What is an angel investor? Assemble a brief profile of the typical private investor. How can entrepreneurs locate potential angels to invest in their businesses?
-
Visic Corporation, a manufacturing company, produces a single product. The following information has been taken from the companys production, sales, and cost records for the just completed year. The...
-
Ludvig Ahlquist, who has considerable experience in the home security industry, is planning to launch a new line of home security alarms that he believes would be superior to other products in the...
-
A paper mill is considering two types of pollution control equipment. The firm wants a 12% rate of return on any avoidable increments of investment. Which equipment should be purchased?...
-
Step 3: Testing Your Configuration Update 1. Restart the SSH service. [Your solution command here] 2. Exit the root account. [Your solution command here] 3. SSH to the target machine using your sysd...
-
VF Corporation is an apparel company that owns recognizable brands like Timberland, Vans, Reef, and 7 For All Mankind. Exhibit 5.18 and 5.19 present balance sheets and income statements,...
-
Alan, has lived in Brisbane for the past 4 months and who works as a rigger on a large building project. On completion of the project Alan will return to Holland, his native country. Is Alan a...
-
A rocket ignited on the ground travels vertically upward with an acceleration of magnitude \(4 \mathrm{~g}\). A spent rocket stage detaches from the payload after the rocket has accelerated for \(5.0...
-
The direction of vector \(\vec{A}\) is opposite the direction of the unit vector \(\hat{i}\). Vector \(\vec{B}\) has half the magnitude of \(\vec{A}\), and \(\vec{A}-\vec{B}\) is a vector of...
-
In the Midwest, you sometimes see large marks painted on the highway shoulder. How can police patrols flying overhead use these marks to check for speeders?
-
Imagine that in his experiment with balls rolling down an inclined plane, Galileo had considered balls that were given an initial speed. Would he have reached different conclusions about the ratio of...
-
Arrange three displacement vectors, of magnitudes \(2 \mathrm{~m}\), \(5 \mathrm{~m}\), and \(7 \mathrm{~m}\), so that their sum is \((a)(+10 \mathrm{~m}) \hat{\imath}\), (b) \((-4 \mathrm{~m})...
-
Coca-Cola issued their quarterly earnings release (2020 Q4) this past week which includes the following unaudited 2020 financial statements: (1) an income statement and a cash flows statement for the...
-
Design a circuit which negative the content of any register and store it in the same register.
-
The experimenters described in Problem 9 hoped that home cage would not affect activity level in any systematic fashion. Explore this question by repeating Problem 9, but replacing SEX with CAGE in...
-
An experiment to evaluate the effects of certain variables on soil erosion was performed on 10-foot-square plots of sloped farmland subjected to 2 inches of artificial rain applied over a 20-minute...
-
The production manager of a plant that manufactures syringes records the marginal cost at various levels of output for 14 randomly selected months. The data are shown here: a. On the accompanying...
-
When facilitating the methylation or pseudouridylation of an rRNA, a snoRNA functions as a. a decoy. b. a scaffold. c. a guide. d. both b and c.
-
Suppose that the overexpression of a particular miRNA was associated with pancreatic cancer. Which of the following agents might be effective in treating this type of cancer? a. Enoxacin b. A DNA...
-
When an ncRNA functions as a decoy, it a. contains binding sites for many different proteins, thereby promoting the formation of a large complex. b. recognizes other ncRNAs and sequesters them,...
Study smarter with the SolutionInn App