Module 4 Flashcards

(40 cards)

1
Q

The &laquo_space;symbol used for displaying the output is known as the _______ operator

A

insertion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It is commonly known as the output operator.

A

Insertion operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Multiple insertion operations («) may be chained in a _____ statement

A

single

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The operator used for taking the input is known as the _________.

A

extraction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following escape sequences represents the horizontal tab?

A

\t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which library is used for basic input-output library in this program?

A

iostream

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What two functions will not work when we remove the iostream header file?

A

cin and cout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The function used to round the value toward zero and returns the nearest integral value.

A

trunc ( )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The sets the decimal precision to be used to format floating-point values on output operations is __________.

A

setprecision

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which implicit conversion is not possible?

A

float to int

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

To use the functions pow() and sqrt(), what should be included in the preprocessor directive part of the C++ program?

A

math.h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

________ type conversion is a conversion performed by the compiler without the programmer’s intervention.

A

Implicit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The standard output by default is the screen, and the C++ stream object defined to access it is

A

cout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the process of converting one predefined type into another?

A

Type casting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which is a valid typecast?

A

(char)a;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which header file do you need to include to use typecasting?

A

None

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which of the following is not true in implicit type conversion?

A

It is a force type conversion

18
Q

We can perform implicit type conversion on: ____________

A

Converting char to int

19
Q

How many parameters are used in floor() function?

20
Q

Given: string name = “Jayar”; What header is needed to be declared to be able to output the content of the string type variable name?

21
Q

If there is a chained multiple extraction operators (») in cin, the inputted values separated by space/s are stored in the variables respectively.

22
Q

To insert a line break, a new-line character shall be inserted at the exact position the line should be broken.

23
Q

Integer is larger than float data type in size.

24
Q

What is type casting?

A

Converting one data type into another

25
______ type conversion requires a type casting operator.
Explicit
26
The function accepts an integer value and returns an integer value that has the same magnitude but positive sign.
Abs ( )
27
Converting larger data type into smaller one is _______ type conversion.
Explicit
28
The "<<" symbol used in cout statement is called ______.
Insertion operator
29
In ________ type conversion, if the operands are of two different data types, then an operand having lower data type is automatically converted into a higher data type
Implicit
30
round() is used to round the given number to the closest highest integer.
False
31
setprecision when used along with ‘_____’ provides precision to floating point numbers correct to decimal numbers mentioned in the brackets of the setprecision.
fixed
32
What can be used to input a string with blank spaces?
getline( )
33
Converting larger data type into smaller one is implicit type conversion.
False
34
When constants and variables of different types are mixed in an expression, they are converted to the same type.
True
35
The function that takes a single argument and returns the absolute value of that number in double.
fabs( )
36
Explicit type of type conversion is also called as standard type conversion.
False
37
The standard ______ by default is the keyboard.
input
38
The extraction operator will extract characters from the keyboard until you didn’t press _____ key.
enter
39
Why can typecasting be dangerous?
You might temporarily lose part of the data - such as truncating a float when typecasting to an int.
40
The _____ functions maps a real number to the greatest preceding integer.
floor