Which of the given is not a cpp looping structure

Assignment Help C/C++ Programming
Reference no: EM131477497

Assignment

1.A logical OR false if:
Only one input is true
There is no such thing as an AND gate
Neither input is true
Both inputs are true

2.A bitwise XOR is true if
Only one input is true
There is no such thing as an OR gate
Both inputs are true
Either input is true

3.The !operator is true
If the input is true
A NOT gate does not exist
If there is no input
If the input is false

4.Which of the following is not a C++ looping structure
DO-UNTIL
DO-WHILE
While
For

5.In a for statement, there are two semi-colons. In which area of a for loop does the initialization of the control variable occur?
Between the first semicolon and the second semicolon
The for loop does not do any tests
After the second semicolon
Before the first semicolon

6.if(x == 2 |- y == 3)
{
//Do Something
}
The |- stands for
AND
XOR
OR
No valid answer for this question!

7.Which of the following statements will cause a switch statement or a loop to terminate immediately?
break
halt
stop
continue

8.In order to stop one case in a switch to fall through to the next case, you would use the ________________ statement
default
break
continue
next case

9.The default statement is used in a switch in order to provide
a case for anything that does not match any other case
a case that might be executed if the single case above it is not executed.
There is no such statement in C++!
a case that is always executed

10.Given that a bit pattern stored in the variable x is 00000101, what will x <<= 1 do to this bit pattern?
It would make it 00001010
Nothing. This does not exist in C++!!
It would make it 00000010
It would make it 00000001

11.The continue statement causes a loop to
This is not a C++ statement!
immediately go to the next iteration after completing the remaining steps in the loop
immediately go to the next iteration without completing the remaining steps in the loop
immediately terminate

12.Which of the following escape characters will cause the a backspace character to be printed to the screen?
\n
\b
\r
\t

13.Which of the following is not a C++ data type?
All are
float
double
char
bool
integer

14.Which of the follow will always execute the body of the loop at least once, regardless of the condition.
a while loop
a do-while loop
a switch statement
a for loop

15.In a for statement, there are two semi-colons. In which area of a for loop does the testing occur?
The for loop does not do any tests
Between the first semicolon and the second semicolon
Before the first semicolon
After the second semicolon

16.Boolean expressions are evaluated similarily to the way arithmetic expressions are evaluated
True
False

17.A switch statement is not a good way to implement a menu for the user of your program
True
False

18.Indentation of code is required by the compiler in C++, and servers no useful purpose for the programmer.
True
False

19. Which of the following is not a C++ data type?
int
double
bool
whole
char
float

20.Variables contained within a block, ie, starting with a { and ending with a } are global variables.
True
False

21.If an identifier is declared as a variable in each of two blocks, one within the other, then these are two different variables with the same name. One variable exists only within the inner block and cannot be accessed outside of the inner block. The other variable exists only in the outer block and cannot be accessed in the inner block. The two variables are distinct, so changes made to one of these variables will have no effect on the other of these two variables.
True
False

22.A block is some C++ code enclosed in braces. The variables declared in a block are local to the block and so the variable names can be used outside of the block for something else.
True
False

23.Which of the following has the highest precedence?
* (Multiply)
&&
==
Unary minus

24.The // is used for _______________
marking the start of a multi-line comment
dividing doubles
making a single line comment, or commenting at the end of a line
This is not part of C++!!!

25.Which of the follow will always execute the body of the loop at least once, regardless of the condition.
a for loop
a switch statement
a do-while loop
a while loop

26.By default, cin uses whitespace as the data separator.
True
False

27.The iomanipsetfill() needs to be "turned off." Meaning, it is set only for the output statement you are currently within.
True
False

28.In order to use setfill(), or any of the other items, you must include <iomanip> and be using cout only.
True
False

29.A byte is 16 bits.
True
False

30.In order to shift the value in an integer variaible x one bit to the left, you would use x <<= 1;
True
False

31.C++ automatically initialized variables to ______________
1
-1
Junk values
0

32.Which of the following iomanip functions does not need to be "turned off" if you use it?
setfill
oct
setprecision
setw

33.A short int has 32 bits on a 32 bit machine.
True
False

34.The data range of a int and an unsigned int are the same.
True
False

35.Masking operations work only on integer and integer-like variables
True
False

36.while( i = 0)
cout<<"Hello"<<endl;
Will iterate indefinitely.
True
False

37.Assignments can be done within a while, if, or do-while condition.
True
False

38.Assuming that x and y are ints,
x ^= y;
y ^= x;
x ^= y;
will __________________
cause a random value to appear in x and y
do nothing. Will not compile!
Swap the values of the variables x and y
will make x and y the same value

39.A for statement requires all three parts, separated by semi-colons, to have a statement within them.
True
False

40.The comma operator allows you to put multiple statement on one line ending with a semi-colon.
True
False

41.in order to use cin, you must include fstream
True
False

42.The number of digits in an integer is one less than the log base 10 of the number.
True
False

43.In standard C++, you can use either && or and for a logical AND in an if statement
True
False

44.In standard C++, you can use an || or an or in an if statement condition.
True
False

45.The sign bit of an integer is bit number 0 in C++.
True
False

46.When converting from double to integer, it is not possible to lose information.
True
False

47.The log10 function works only on doubles or floats.
True
False

48.A while statement cannot be nested within an if statement
True
False

49.The else statement is required on all if statements;
True
False

50.for(int i = 0; i < 100000; i++);
is a valid C++ statement
True
False.

Reference no: EM131477497

Questions Cloud

What about this pillar is especially interesting to you : What similarities do you see between this week's highlighted religious traditions? How do the cosmogonies surrounding death and the afterlife differ?
What do you think it was like in medieval cities : What do you think it was like in medieval cities? Are there any conditions that you might have enjoyed more than what we experience in our lives today?
How would you describe the location of the organization : COMM 7200 - Spring 2017 Organization Communication in Diverse Contexts. How would you describe the location of the organization
What are the three steps in the dcf valuation process : How do the cash flows differ between bonds and common stock?
Which of the given is not a cpp looping structure : Which of the following is not a C++ looping structure? Which of the following statements will cause a switch statement or a loop to terminate immediately?
What types of embedded options favor the issuer : Why may the market price of a bond not equal its par value?
Compare the changes in vibrational spectra : Compare the changes in vibrational spectra of the phen ligand which result from conversion to the quinone. What has more effect on the bonding within the phen ligand?
What is the purpose of an indenture : What are protective covenants? What are examples of negative covenants and positive covenants?
What does bond rating say about potential default risk bond : What is the priority of claims on the assets of the issuer for secured debt, debentures, and subordinated debentures?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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