Answer the following

Assignment Help Computer Engineering
Reference no: EM1332046

1. What is the value of the expression
(x OR y) AND z
if x = true, y = false and z = false?

Answer:

2. What is the final value of y after executing the following code:

int y = 0;
int x = 1;
while(x<5)
{
y = y + 2*x;
x = x+1;
}

Answer:

3. Write the code above using a repeat loop.

Answer:

4. Write the code above using a for loop.

Answer:

5. What is the final value of x after executing the following code:

int x = 10
if (x>10)
{
x = x * 3;
}
else
{
x = 2*x;
}

Answer:

6. If x = 2 and y = 3 what are the values of the following expressions?
a. (x + y * 2)/4 + 4
b. (y - x) * 3 + (x + y) * 2

Answer:

7. How many times does the following loop execute?
int x = 8;
do
{
cout<<"this is a message"<<endl;
x--;
}while(x!=0);

Answer:

8. What is the output of the following code? Show your work with each of the 3 variables.

int x = 0;
int y = 1;
int total = 0;
while(x<=3)
{
y = y+x;
total = total + y;
x = x+1;
}
cout<<"Total is "<<total<<endl;

Answer:

9. What C++ statement would you use to print the phrase "CMIS102A" three times in a new line?

Answer:

10. How many times in the following C++ code will "CMIS 102" be written to the standard output?

for (int i = 1; i<=3; i++)
for( int j = 1; j<=i; j++)
cout <<"CMIS 102"<<endl;

Reference no: EM1332046

Questions Cloud

Explain government help for small business : What do you meant by small business and how government help for small business
Hrm in project management led organizations : Sustaining Human Resource Management in Project Management Led Organizations in the Private Services Sector in UK:
Private-sector making public commitment to diversity : Is it necessary for a private-sector organization to make a public commitment to diversity?
Explain cost of capital of amazon : Explain cost of capital of amazon
Answer the following : What is final value of y after executing the following code.
Factors that affect hrm : Factors that affect HRM - Besides cultural differences, what other factors affect HRM in an organization with international operations?
Program program that converts eight (8) bit binary numbers : Write down a C++ program that converts eight (8) bit binary numbers to their decimal equivalents. The program should retrieve the binary numbers (one at a time) from a data file (use a long int for the variable that represents the binary number).
Analyze three functional areas : Prepare a written recommendation that holistically addresses a problem or business need: Analyze three functional areas
Explaining inclusive environment : What is meant by an "inclusive environment"? Provide examples.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Give some suggestions for resolving those issues

define some of the issues surrounding widespread access to some of the multiple health knowledge sources available on the internet.

  Write down a c++ program that has a class called flight

Write down a C++ program that has a class called flight.

  How to convert the ff phrase into programming notation

how to Convert the ff phrase into programming notation

  New system implementation

In new system implementation, what could you do as the lead system designed to assure the implementation went smoothly?

  Threats resolved by redhat linux

The switches have the VLANs defined, one for the offices, one for the MIS, and one for the warehouse. Recognize what threats are resolved by the Redhat linux.

  Assume that we compare the insertion sort method

assume that we compare the insertion sort method. while classification with merge requires 64n*lg(n) steps. For which values of n, does insertion sort method outclass the merge sort process.

  Program for calling the function

Suppose the availability of class named DataTransmitter which offers a static method, sendSignal which takes no arguments. Write down the code for calling this method.

  What profit do you see with partitioned view

Explain your idea for a database along with your thoughts for a partitioned view. 1. How will you use this partitioned view?

  What is difference between client and a server

What are the differences between client and a server. What is function of each layer in a three-layer application?

  Find the number rounded to the nearest hundredth

For each value read, the program should display the original value, the number rounded to the nearest integer, the number rounded to the nearest tenth, the number rounded to the nearest hundredth and the number rounded to nearest thousandth.

  Key elements of an entry strategy

Write down the key elements of an entry strategy, especially for the high-tech environment? The answer requires to be of at least 300 words. Also include any references

  What is mno

What is MNO.

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