Answers 1

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Answers 1 as PDF for free.

More details

  • Words: 227
  • Pages: 2
Advanced C++ Assignment one Due date Sunday 26th October 5 pm Note: no late assignments will be accepted Question 3(1 mark)

29149589-17471327

Multiple Choice 1. Which of the following is not a valid identifier? a. return 2. What is the value of x after the following statements? int x, y, z; y = 10; z = 3; x = y * z + 3; 33 3. What is the value of x after the following statements? int x; x = 0; x = x + 30; 30 4. What is the value of x after the following statements? int x; x = x + 30; Garbage 5. What is the output of the following code? float value; value = 33.5; cout << value << endl; 33.5 6. What is the output of the following code? float value; value = 33.5; 1

cout << "value" << endl; value 7. What is the output of the following code? cout << "This is a \\" << endl; This is a \ 8. Which of the following lines correctly reads a value from the keyboard and stores it in the variable named myFloat? cin > > myFloat; 9. What is the value of x after the following statements? float x; x = 15/4; 3.75 10.What is the value of x after the following statements? int x; x = 15/4; 3

2

Related Documents

Answers 1
October 2019 11
Answers 1
May 2020 5
Answers
April 2020 22
Answers
April 2020 24
Answers
November 2019 52
Answers
December 2019 28