C++ Chapter 2

C++ Chapter 2

University

7 Qs

quiz-placeholder

Similar activities

Operadores en Excel

Operadores en Excel

University

10 Qs

CSSE Quiz Day2

CSSE Quiz Day2

University

12 Qs

Flujos en Java/Android

Flujos en Java/Android

12th Grade - University

10 Qs

Lourdes Amaranta Ayala Gracia

Lourdes Amaranta Ayala Gracia

8th Grade - University

10 Qs

Variables

Variables

University

10 Qs

cp06-01-1D-Array

cp06-01-1D-Array

University

10 Qs

HTML & CSS

HTML & CSS

University

10 Qs

Web Development, stationing.

Web Development, stationing.

University

10 Qs

C++ Chapter 2

C++ Chapter 2

Assessment

Quiz

Computers

University

Hard

Created by

Albert Gorup

Used 11+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between the following two lines of code:


cout << "perimeter"; //LINE 1

cout << perimeter; //LINE 2

LINE 1 prints out the actual word perimeter and LINE 2 prints out the value held in the variable: perimeter.

LINE 2 prints out the actual word perimeter and LINE 1 prints out the value held in the variable: perimeter.

You do not need a semi-colon at the end of the two lines.

The lines are identical.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements will read in THREE values from standard input (user typing it in) into variables named num1, num2, and num3 .

cin>>num1>>num2>>num3;

cin>>num1>>num2>>num3>>endl;

cout<<num1<<num2<<num3<<endl;

cin>>number1>>number2>>number3;

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

(True or False) The following two snippets of code have the same result.

cin >> x >> y;

cin >> x;

cin >> y;

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an INVALID identifier?

1stplace

_firstplace

firstPlace

place1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these data types requires the least amount of memory?

short

double

int

float

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To declare and initialize 3.14159 to a constant PI, which of the following is the correct syntax?

const PI = 3.14159;

const double 3.14159 = PI;

const double PI = 3.14159;

const int PI = 3.14159;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

(T or F) The software development life cycle is a multi-stage process that includes the following items (in the following order):

* requirements specification

* system analysis

* system design

* implementation testing

* deployment

* maintenance

True

False