C++ Chapter 2

C++ Chapter 2

University

7 Qs

quiz-placeholder

Similar activities

Python Basics - Variables

Python Basics - Variables

University

11 Qs

Struktur Data

Struktur Data

University

10 Qs

Operadores relacionales y lógicos

Operadores relacionales y lógicos

University

7 Qs

Programming I Quiz 1

Programming I Quiz 1

University

11 Qs

Ex.Py Prizing Quiz

Ex.Py Prizing Quiz

University

8 Qs

C++ Chapter 3

C++ Chapter 3

University

10 Qs

FOP - CHAPTER 3

FOP - CHAPTER 3

University

10 Qs

CPP/C

CPP/C

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