Hand tracing table

Assignment Help Basic Computer Science
Reference no: EM13856800

Hand Tracing Table: Please complete the follow Hand Trace Tables. Using MS Word insert the table with proper numbers of columns and table header, below the "Hand Tracing Table Goes Here:" (2 points each, 8 points total).

1. Hand-trace the following code, showing the value of n and the output.

int n = 5;

while (n >= 0)

{

            n--;

            cout<< n;

}

Hand Tracing Table Goes Here:

2. Hand-trace the following code, showing the value of n and the output. What potential error do you notice?

int n = 1;

while (n <= 3)

{

            cout<< n << " ";

            n++;

}

Hand Tracing Table Goes Here:

3. Hand-trace the following code, assuming that a is 2 and n is 4. Then explain what the code does for arbitrary values of a and n.

int r = 1;

inti = 1;

while (i<= n)

{

            r = r * a;

            i ++;

}

Hand Tracing Table Goes Here:

4. Trace the following code. What error do you observe?

int n = 1;

while (n != 50)

{

            cout<< n;

            n = n + 10;

}

Hand Tracing Table Goes Here:

Reference no: EM13856800

Questions Cloud

Responsibilities healthcare manager applies to fraud-abuse : Describe your responsibilities as a healthcare manager as it applies to fraud and abuse. What if you were a unit manager? Department manager? A member of the executive team?
Whole foods in order to reach her target profit : Lucy supplies Whole Foods with small jars of incense-fragranced shea butter at $8 each, with a variable cost of $3, and that has a retail price at Whole Foods of $12. She invested $75,000 in fixed costs and aims to earn a profit of $150,000 in one ye..
Highly structured progression of the superfund process? : Which sequence would correctly represent the highly structured progression of the Superfund process?
What is the market value of kurzs existing assets : What is the market value of Kurzs existing assets and What is the new price per share immediately following this announcement, but before the shares are issued or the debt is retired?
Hand tracing table : Hand Tracing Table: Please complete the follow Hand Trace Tables. Using MS Word insert the table with proper numbers of columns and table header, below the "Hand Tracing Table Goes Here:" (2 points each, 8 points total).
What is the relationship between risk and expected return : What is risk? What is the relationship between risk and expected return? Describe and discuss the role of the investment banker. When is a syndicate formed and what is the purpose?
What are the key components of creating a project plan : Describe the overall purpose of the Planning Actions. What are the key components of creating a Project plan?
Consultant air focuses business on high-paying : Consultant Air focuses business on high-paying McKinsey consultants, but to fill planes, it also carries the general public. It is flying a 100-seat jet from Atlanta to San Francisco and the consultant demand is normally distributed with mean 65 and ..
Program that reads expressions over binary operators : Write a program that reads expressions over binary operators +, -, *, /, ^ and parenthesis from the standard input and displays the result of evaluating the input expression to the standard output. The program must first read the priorities and as..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  The goods are substitutes

(Substitutes and Complements) For each of the following pair of goods, determine whether the goods are substitutes, complements, or unrelated: Peanut butter and jelly, Private and public transportation, coke and pepsi, alarm clocks and automobiles, g..

  What change management initiatives should km group have

What change management initiatives should the KM group have initiated at Infosys before attempting to develop and implement knowledge management at the company?

  Express the angle with respect to the tangential velocity

Express the angle with respect to the tangential velocity vector (ie, +90° points radially out). (Points : 5) A) 10.9 m/s2 at -75° B) 10.9 m/s2 at +75° C) 37.9 m/s2 at -75° D) 37.9 m/s2 at +75°

  Prompt the user for the number of sides on the die

1.Prompt the user for the number of sides on the die.2."Roll" the die three times by generating a random number between 1 (inclusive) and the number of sides (inclusive).3.Keep track of the running sum of the rolls for the die and output the sum and ..

  Current article related to project initiation

You will find a current article related to week 3 topic, Project Initiation, summarize the article in your own words, and then describe how the article relates to the course concepts.

  How many disk i-o operations needed to read contents

How many disk I/O operations might be need to read contents of small local file at /a/b/c? suppose that none of disk blocks is presently being cached.

  Explain it ethics and responsible conduct

Specify the main reasons why green computing should be part of any organization's social responsibility posture. Next, propose three (3) actions that IT organizations could take to reduce their carbon footprint.

  Identify create, update, and delete privileges

Part 1: Identify Create, Update, and Delete PrivilegesFor each piece of information, first identify who has create, update, and delete privileges. Include any individuals or departments that have these sorts of information privileges. There may be se..

  What are the similarities between risc and cisc

What are the similarities between RISC and CISC

  Making it eco-friendly

When you hear the term "making IT eco-friendly", explain how this is related to Information Technology and the environment.

  Write a class encapsulating the concept of a rational number

Write a class encapsulating the concept of a rational number, assuming a rational number has the following attributes: an integer representing the numerator of the rational number another integer representing the denominator of the rational number

  Explain legal reasons for not performing examination

Legal reasons for not performing examination on suspect's computer, but sometimes you have to compromise. If we make compromise, is it acceptable by court?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd