Intro to C++ Ch03

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following is NOT a string literal constant? Select one: a."&" b.'abc' c."Hello" d.""

The correct answer is: 'abc'

Which of the following is a valid integer value? Select one: a.-123 b.16.2 c.5.132456e+03 d.'9'

The correct answer is: -123

What is the binary equivalent of the decimal number 7? Select one: a.0111 b.1001 c.1010 d.0011

The correct answer is: 0111

What is the result of raising the base number to the 0th power? Select one: a.1 b.compiler error c.the base number d.0

The correct answer is: 1

What is an example of an invalid name for a memory location in C++? Select one: a.CiTy b.2ndname c.zip3Code d.middle_name

The correct answer is: 2ndname

What is the ASCII value of the '0' character? Select one: a.48 b.0.0 c.0 d.66

The correct answer is: 48

What is the decimal equivalent of the binary number 110? Select one: a.2 b.4 c.8 d.6

The correct answer is: 6

What is the name of a coding scheme that assigns a specific numeric code to each character on your keyboard? Select one: a.Octal b.ASCII c.Hexadecimal d.Decimal

The correct answer is: ASCII

Which of the following would be a valid name for a memory location in C++? Select one: a.me&you b.my.name c.a1B2c3D4 d.3oreos

The correct answer is: a1B2c3D4

Which number system is used to store data in memory? Select one: a.hexadecimal b.decimal c.binary d.octal

The correct answer is: binary

When a variable's name contains two or more words, most C++ programmers enter the name using what type of notation? Select one: a.all capital letters b.a space between the words c.all lowercase letters d.camel case

The correct answer is: camel case

When declaring a named constant, which keyword indicates that the memory location being declared cannot be changed during runtime? Select one: a.constant b.bool c.const d.fixed

The correct answer is: const

When a value is converted from one data type to another data type that can store smaller numbers, what type of conversion has occurred? Select one: a.compilation b.promotion c.calculation d.demotion

The correct answer is: demotion

All numeric literal constants with a decimal place are considered which data type? Select one: a.double b.bool c.real d.int

The correct answer is: double

Which of the following data types can contain a real number? Select one: a.bool b.int c.float d.char

The correct answer is: float

If the value's data type does not match the memory location's data type, what process does the computer use to convert the value to fit the memory location? Select one: a.rounding b.explicit type conversion c.truncation d.implicit type conversion

The correct answer is: implicit type conversion

What is the term used for the assignment a beginning value to a memory location? Select one: a.implicit type conversion b.explicit type conversion c.initializing d.revision

The correct answer is: initializing

Which of the following is a word that has a special meaning in the programming language you are using? Select one: a.named constant b.keyword c.hashtag d.variable

The correct answer is: keyword

What is an item of data that can appear in a program instruction and can be stored in a memory location. Select one: a.literal constant b.keyword c.variable d.named constant

The correct answer is: literal constant

What is a memory location whose value cannot change during runtime called? Select one: a.keyword b.named constant c.variable d.statement

The correct answer is: named constant

Which of the following is NOT a rule for naming a memory location in C++? Select one: a.the name must begin with a letter b.the name cannot contain spaces c.names in C++ are not case sensitive d.the name cannot be a keyword

The correct answer is: names in C++ are not case sensitive

Memory locations assigned the char data type can store how many characters? Select one: a.none of the above b.more than one c.one d.zero

The correct answer is: one

What character is used to enclose a character literal constant? Select one: a.brackets b.single quotes c.double quotes d.parentheses

The correct answer is: single quotes

Which data type is referred to as a user-defined data type? Select one: a.short b.bool c.string d.char

The correct answer is: string

The short data type can store a number in the range from -32,768 to +32,767. How many bytes of memory is required for the short data type? Select one: a.four b.one c.eight d.two

The correct answer is: two

Which of the following best describes a memory location whose value can change during runtime? Select one: a.variable b.keyword c.statement d.named constant

The correct answer is: variable


Set pelajaran terkait

Managing Organizational Knowledge Module 8 Terms

View Set

Custom Assessment Builder 2 (Fall 2023)

View Set

N406: Unit 9 Exam 3 PREPU (CANCER)

View Set

Pharmacology HESI Comprehensive Review for the NCLEX-PN Exam, 6th Edition Study Mode

View Set