The following program has careless errors on several lines. Find and correct the errors and show the
Question:
The following program has careless errors on several lines. Find and correct the errors and show the output where requested.
Transcribed Image Text:
#include int main () { } int* ptr: int* temp; int x; ptr = new int; *ptr = 4; *temp = *ptr; cout < < ptr X = 9; *temp = X; cout < < *ptr < < *temp; < < temp; ptr= new int; ptr = 5; cout < < *ptr < < *temp; // output: return 0;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (QA)
Answered By
Nazrin Ziad
I am a post graduate in Zoology with specialization in Entomology.I also have a Bachelor degree in Education.I posess more than 10 years of teaching as well as tutoring experience.I have done a project on histopathological analysis on alcohol treated liver of Albino Mice.
I can deal with every field under Biology from basic to advanced level.I can also guide you for your project works related to biological subjects other than tutoring.You can also seek my help for cracking competitive exams with biology as one of the subjects.
3.30+
2+ Reviews
10+ Question Solved
Related Book For
C++ Plus Data Structures
ISBN: 9781284089189
6th Edition
Authors: Nell Dale, Chip Weems, Tim Richards
Question Posted:
Students also viewed these Computer science 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...
-
How many bracketings of length 2n will there now be? 1 [TURN OVER CST.93.2.2 2 Two teams A and B play a match in which the winner is the first team to win n games. If A needs i games to win and B...
-
Skip to main content Lab 11: A Web Server The goal of this lab is to write a simple, but functional, web server that is capable of sending files to a web browser on request. The web server must...
-
What is a derivative contract? Give an example. How are derivatives related to risk management?
-
In prewar days there was a controversy, perhaps apocryphal, about whether the bumblebee has a legitimate aerodynamic right to fly. The average bumblebee (Bombus terrestris) weighs 0.88 g, with a wing...
-
Youre in a store like REI, Cabelas, or Bass Pro Shops that specializes in selling outdoor clothing and accessories. On the front of a rack of rain jackets, you see one with a price tag of $400 and...
-
Select two competing companies from the same industry, for example, Coke and Pepsi, Adidas and Nike, Verizon and AT&T, Intel and Samsung, General Motors and Ford, Costco and Kroger. Using selected...
-
Jan Shumard, president and general manager of Danbury Company, was concerned about the future of one of the companys largest divisions. The divisions most recent quarterly income statement follows:...
-
Moonstar & Company reported the following account balances: Administrative expenses $38,000 Accounts receivable 70,000 Sales revenue 636,000 Selling expenses 22,000 Cost of goods sold 262,500 Cash...
-
Read the code segment and fill in blank #20. 1. NULL 2. True 3. false 4. listData 5. answer not shown 4 Class Unsorted Type { public: //all the prototypes go here. private: int length; Node Type*...
-
Based on the following declarations, tell whether each statement below is syntactically legal (yes) or illegal (no). int* p; int* q; int* r; int a; int b; int c; int* p; int* q: int* r; int a; int b;...
-
To expand operations, Aragon Consulting issued 1,000 shares of previously unissued common stock with a par value of $ 1. The price for the stock was $ 50 per share. Analyze the accounting equation...
-
For each of the business transactions listed below, you are to enter in the Workbook: a the account name, with the debit account first b whether the account entry is a debit or credit c the chart of...
-
The business commenced with $5000 in assets and $5000 in owners equity. Write this in the accounting equation format provided in the Workbook.
-
What is the difference between: taxable supplies input-taxed supplies GST-free supplies?
-
From the following business transactions you are required to show, in the Workbook, the effects on the accounting equation, using the above format. (This solution is used in questions 3.12 and 3.16.)...
-
What is the difference between inventories and supplies?
-
Compare the trait, behavioral, and situational approaches to leadership in terms of practical value to organizations seeking to identify and develop present and future leaders.
-
Explain the circumstances that could result in a long-term bank loan being shown in a statement of financial position as a current liability.
-
Consider two different implementations of the same instruction set architecture. Th e instructions can be divided into four classes according to their CPI (class A, B, C, and D). P1 with a clock rate...
-
Consider three diff erent processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz clock rate and a CPI of 1.0. P3 has a 4.0 GHz...
-
Assume a color display using 8 bits for each of the primary colors (red, green, blue) per pixel and a frame size of 1280 1024. a. What is the minimum size in bytes of the frame buff er to store a...
-
AMAZON.COM, INC. 5 points CONSOLIDATED STATEMENTS OF OPERATIONS (in millions, except per share data) Year Ended December 31, Actual 2019 2020 2021 Net product sales $160,408 $215,915 $241,787 Net...
-
Hayden is 13-years old and he has four years until he is planning on attending University or college. His parents have been saving $225 per month for his education in a RESP and it has a current...
-
At the beginning of January, Bijeaux Beach Balls Inc had 10,000 units in beginning inventory that were 60% complete as to DM and 20% complete as to CC in the Forming Department. The costs associated...
Study smarter with the SolutionInn App