What would be the output on the terminal when a user tries to compile and execute...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What would be the output on the terminal when a user tries to compile and execute the following files. Write the steps to compile and run as well. [10]< #include <stdio.h> wwwwwwwmmm int buf[]={1,3}; < int main() < swap ();< printf("x= %d, y=%d\n", buf[0], buf[1]); < return 0;< } #include <stdio.h> extern int buf[]; ( int *bufp0 = &buf[0];< static int *bufp1; void swap () < }< int temp; wwww bufpl = &buf [1];< temp = *bufp0;< *bufp0 = *bufp1;< *bufp1 = temp; + What would be the output on the terminal when a user tries to compile and execute the following files. Write the steps to compile and run as well. [10]< #include <stdio.h> wwwwwwwmmm int buf[]={1,3}; < int main() < swap ();< printf("x= %d, y=%d\n", buf[0], buf[1]); < return 0;< } #include <stdio.h> extern int buf[]; ( int *bufp0 = &buf[0];< static int *bufp1; void swap () < }< int temp; wwww bufpl = &buf [1];< temp = *bufp0;< *bufp0 = *bufp1;< *bufp1 = temp; +
Expert Answer:
Answer rating: 100% (QA)
The provided code has some issues including missing function declarations and a misplaced function call It seems like you intend to swap the values in ... View the full answer
Related Book For
Accounting Information Systems
ISBN: 9780132871938
11th Edition
Authors: George H. Bodnar, William S. Hopwood
Posted Date:
Students also viewed these programming questions
-
Read the following scenario. Imagine a firm in monopolistic competition. A firm in monopolistic competition produces a product that you are familiar with, such as clothing and food. A monopolistic...
-
Chec Ag Bio Tech (ABT) was organized on January 1 by four friends. Each organizer invested $6,875 in the company and, in turn, was issued 5,500 shares of common stock. To date, they are the only...
-
The code that you add to the Craps main method needs to do the following steps in the following order (where indicated by the comments in the code itself): 1. Declare an integer array named counts...
-
Two experienced managers at Wilson Boat, Inc. are resisting the introduction of a computerized exponential smoothing system, claiming that their judgmental forecasts are much better than any computer...
-
How could HR managers at the Container Store analyze the effectiveness of HRM to ensure they are helping the company become more profitable? Would your ideas compromise the employees-first policy?
-
Drilling Company uses activity-based costing and provides this information: Drilling has just completed 80 units of a component for a customer. Each unit required 100 parts and 3 machine hours. The...
-
What are the three steps that can be taken along a corporate eco-efficiency path? How are the five modules related to development of a measure of eco-efficiency?
-
Spangler Company wrote off the following accounts receivable as uncollectible for the first year of its operations ending December 31, 2012: Customer Amount Will Boyette ..... $10,000 Stan Frey...
-
The following info relates to Eva Co's sales tax for the month of March 20X3. Sales (including sales tax). $109, 250 Purchases (net of sales tax?). $64,000 Sales tax is charged at a flat rate of 15%....
-
Write a function: string solution (string &S, string &T); that, given two strings S and T consisting of N and M characters, respectively, determines whether string T can be obtained from string S by...
-
Differentiate Tightly coupled and Loosely coupled system.
-
5. Please solve the following problem Min f (a, b, c, d) = 18abcd a b c d + + + 16 36 81 49 1 s.t.
-
You own a portfolio that has 2000 shares of stock A, which is priced at $13.27 per share and has an expected return of 16.16%, and 2000 shares of stock B, which is priced at $9.16 per share and has...
-
As of Monday morning, the ledger balance and the availablebalance for a firm was $3,000. During the day, the firm wrote threechecks in the amounts of $750, $225, and $452. The firm deposited acheck...
-
Southeast U\'s campus book store sells course packs for $15.00each, the variable cost per pack is $12.00, fixed costs for thisoperation are $300,000, and annual sales are 95,000 packs. The...
-
Prove 1+ cos = sine @= 1-cos e Prove 1-cos 20+ sin 20 1+ cos 20+ sin 28 tan e
-
For Q, For Q39 L25 5710 = 5755 Ls = P The first quartile, or 25th percentile, is .25 of the way between the value in position 3 (5850) and the value in position 4 (5880). Thus, Q =...
-
Dan and Diana file a joint return. Dan earned $31,000 during the year before losing his job. Diana received Social Security benefits of $5,000. a. Determine the taxable portion of the Social Security...
-
The Magic Rock Company of Houston, Texas, is implementing a computer- based inventory control system. The system will use a sequentially organized inventory master file and a transaction file....
-
Identify and describe several output controls. Why are such controls necessary?
-
Characterize each of the three major models of logical data structures. a. Tree or hierarchical models b. Network models c. Relational models
-
Which of the following is the reason preliminary estimates of materiality should be made by the auditor? a. Materiality guidelines cannot be adjusted after the audit procedures are conducted. b....
-
Which of the following is not a part of the audit risk model? a. Inherent risk. b. Control risk. c. Materiality risk. d. Detection risk.
-
Which of the following is a correct statement? a. There is an inverse relationship between risk levels and the amount of necessary audit effort. b. There is a direct relationship between risk levels...
Study smarter with the SolutionInn App