6. (10 points) What will the following program output - and why? #include int main(){ int...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
6. (10 points) What will the following program output - and why? #include int main(){ int x = 4; int y=3; if(x y) {printf("X is larger. ");3 if(x=y) (printf("They are the same. ");} 7. (5 points) What does this while statement do, in terms of program flow control? while(1){ //Your code goes here 8. (10 points) Declare a signed integer (int) variable called x and write code to read in a number from the keyboard into this variable and then print it out. I.E. The user will type in a number, which should be stored in x. You should include a prompt for the user, but you don't have to. (You can assume your code will run inside main(), and that has already been #included for you.) 6. (10 points) What will the following program output - and why? #include int main(){ int x = 4; int y=3; if(x y) {printf("X is larger. ");3 if(x=y) (printf("They are the same. ");} 7. (5 points) What does this while statement do, in terms of program flow control? while(1){ //Your code goes here 8. (10 points) Declare a signed integer (int) variable called x and write code to read in a number from the keyboard into this variable and then print it out. I.E. The user will type in a number, which should be stored in x. You should include a prompt for the user, but you don't have to. (You can assume your code will run inside main(), and that has already been #included for you.)
Expert Answer:
Answer rating: 100% (QA)
6 The program has a syntax error and will not compile successfully There are missing semicolons at t... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Mary Sue owns 600 shares of QRS Moving Company. QRS pays a quarterly dividend of $0.50 per share. What is the total annual dividend that Mary Sue will receive?
-
Do analytical procedures use only financial data based on transactions and balances for the current period? Explain using examples.
-
How has the proliferation of digital technologies and social media platforms altered patterns of social interaction, and what are the potential consequences for social cohesion, privacy, and...
-
Refer to Example 11. Ignore the covariate original reflectivity. Perform an analysis of variance take \(\alpha=0.05\) Data From Example 11 EXAMPLE II Creating an analysis of covariance table with one...
-
Evaluate the following statements using graphical analysis. Provide a brief narrative explanation of your graph to support your evaluation. Make sure the axes and curves in your graphs are properly...
-
IBM issued a 30-year $1,000 par value bond with 8% coupon rate 10 years ago. The coupons are paid semiannually. The bond is currently selling at 96% of its par value. What is the YTM on IBM's debt...
-
Implement a priority queue capable of holding objects of an arbitrary type T. Implement the queue using ArrayList as an underlying data structure. A priority queue is a type of list where every item...
-
24. Both you and your older brother would like to have $28,500 in 14 in years. Because of your success in this class, you feel that you are a more savvy investor than your brother and will be able to...
-
Figure 4 shows the fluid gate structure that holds seawater with surrounding temperature 25 C. A seawater have 2.95 m deep and width of rectangular opening door is 0.78 m. Calculate the forces on the...
-
Given the following information, determine the cost of the inventory at June 30 using the LIFO perpetual inventory method. Date June 1 June 15 June 29 Activities Beginning inventory Units Acquired at...
-
This is a two-part assignment. I want to expose you to another deduction that arises with micro and small businesses. That is Tax-in-Gross. If you say it carefully you may be able to visualize why...
-
1. (Matlab) Assume a bank receives the following liability schedule (numbers in dollars) Year 1 Year 2 Year 3 Year 4 Year 5 Year 6 Year 7 Year 8 12,000 18,000 20,000 20,000 16,000 15,000 12,000...
-
How can we stop individuals who go in front of the parole board from manipulating parole hearings? Should inmates be allowed to adjourn their hearing without limitations?
-
Consider a game of poker being played with a standard 52-card deck (four suits, each of which has 13 different denominations of cards). At a certain point in the game, six cards have been exposed. Of...
-
This exercise considers data from the Medical Expenditure Panel Survey (MEPS) described in Exercise 1.1 and Section 11.4. Our dependent variable consists of the number of outpatient (COUNTOP) visits....
-
This exercise considers the data described in the Section 13.2.2 ratemaking classification example using data in Table 13.3 Table 13.3 . a. Fit a gamma regression model using a log-link function with...
-
Verify that the Tweedie distribution is a member of the linear exponential family of distributions by checking equation (13.9). In particular, provide an expression for \(S(y, \phi)\) (note that...
Study smarter with the SolutionInn App