Question

QUESTION 7 Which of the following is a valid C++ assignment statement? (assume each letter is a different variable) A.y=b-c B

QUESTION 13 What is the comment section at the beginning of a program that gives information about the author and the program

QUESTION 18 What will the following code statement do? cout << fixed << showpoint << setprecision(2); A format the output of

QUESTION 22 Match the output of the following code for each of the inputs listed. (Assume that the code is correct and will c

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer 7: D
this is valid assignment
Wrong Answers:
A ) ~ can't be used for assignments
B ) left side must be always left side
C ) there must be an operand
E ) right operand must be closed

Answer 8: E
variables name must start with a alphabate or underscore
Wrong Answer:
A ) Should not start with number
B ) Should not start with special char
C ) Should not start with special char
D ) Should not start with special char

Answer 9: D
Wrong Answers:
kbdin is not valid library
cstdlib is for different purpose
input is not valid library
iomanip for formatting

Answer 10:B
Can't contain space between in variable

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
QUESTION 7 Which of the following is a valid C++ assignment statement? (assume each letter is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • QUESTION 1 Which statement results in the value false? The value of count is 0; limit...

    QUESTION 1 Which statement results in the value false? The value of count is 0; limit is 10. (count != 0)&&(limit < 20) (count == 0)&&(limit < 20) (count != 0)||(limit < 20) (count == 0)&&(limit < 20) 10 points    QUESTION 2 If this code fragment were executed in an otherwise correct and complete program, what would the output be? int a = 3, b = 2, c = 5 if (a > b) a = 4; if (...

  • QUESTION 1 What is the output of the following code snippet? int main() { bool attendance...

    QUESTION 1 What is the output of the following code snippet? int main() { bool attendance = false; string str = "Unknown"; attendance = !(attendance); if (!attendance) { str = "False"; } if (attendance) { attendance = false; } if (attendance) { str = "True"; } else { str = "Maybe"; } cout << str << endl; return 0; } False True Unknown Maybe QUESTION 2 What is the output of the following code snippet? #include <iostream> #include <string> using...

  • This lab is to give you more experience with CH Making Decisions and Looping Please do...

    This lab is to give you more experience with CH Making Decisions and Looping Please do the following Review Questions 1. Using the following chart, write an if else if statement that assigns. 10..15 or 20 to commission, depending on the value in sales. Make sure sales is valid (ie. >= 0) Sales Commission Rate Up to $10.000 10% $10,000 to $15,000 15% Over $15,000 20% 2. Convert the following if else if statement into a switch statement. double number...

  • Write this code in c++ and screen shot the code 2. Given the code below: int...

    Write this code in c++ and screen shot the code 2. Given the code below: int vals t1 (4.7,11). valPtr valPtr-vals What is the output of the following statements, if it is an address, indicate that: a. cout (1valPtr) F c. cout << (valPtr2); e. cout <<*(valPtr0) cout << "True" cout << "False" cout << "True" cout << "False" cout << "True" cout << "False", ㄱ Hip else g. if (valPtr&valPtr [1]) else h. if (valPtr (4] &valPtr [1]) else

  • QUESTION 1 What will be displayed as a result of executing the following code? int   x...

    QUESTION 1 What will be displayed as a result of executing the following code? int   x = 5, y = 20; x += 32; y /= 4; cout <<"x = " << x <<"y = " << y; A. x = 32, y = 4 B. x = 9, y = 52 C. x = 37, y = 5 D. x = 160, y = 80 8 points    QUESTION 2 What will be the displayed when the following code...

  • PLEASE TYPE OUT IN TEXT (please no pdf or writing) C++ CODE Consider the following program...

    PLEASE TYPE OUT IN TEXT (please no pdf or writing) C++ CODE Consider the following program in which the statements are in the incorrect order. Rearrange the statements in the following order so that the program prompts the user to input: The height of the base of a cylinder The radius of the base of a cylinder The program then outputs (in order): The volume of the cylinder. The surface area of the cylinder Format the output to two decimal...

  • ,,1. Which of the following statments are valid C++ statements? A) cout << "Hello World" :...

    ,,1. Which of the following statments are valid C++ statements? A) cout << "Hello World" : B) cout << Hello World; C) cout << "Hello " << "World" ; D) cout << "Hello" << "World" ; 2. What is the difference between the literals 'A' and "A"? ,3. Read the input from user; Check for valid entries If input is invalid: print an error message; else: calculate the result and print to the console; exit; The code snippet above may...

  • Question 15 After the following code executes, what is the output if user enters 0? int...

    Question 15 After the following code executes, what is the output if user enters 0? int x =-1; cout << "Enter O or 1:"; cin >> X; if (x) cout << true else cout << false O nothing will be displayed true O false 0

  • Consider the following program in which the statements are in the incorrect order. Rearrange the statements...

    Consider the following program in which the statements are in the incorrect order. Rearrange the statements so that the program prompts the user to input the height and the radius of the base of a cylinder and outputs the volume and surface area of the cylinder. Formant the output to two decimal places. #include <iomanip> #include <cmath> int main () {} double height; cout << ”Volume of the cylinder = “ <<PI * pow(radius, 2.0) * height << endl; cout...

  • What will the output be in the following? int a, b, c; a-b-0; c 5; ific<...

    What will the output be in the following? int a, b, c; a-b-0; c 5; ific< 1011 (a = = 0 &&b != 0)) 3. cout<<True"; else cout<<"False", What will the output be in the following? a. int icount; 4. do count = 0; cout<<"The count is "<cicount<<endl; while(icount<10); int count = 0; do b. cout<<"The count is “<<count<<endl; while++icount<10); c. for(int n 5; n>0; n-) cout<<n;

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT