CSCI 223

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

The syntax for a type cast operation in C is(Note: the angled brackets are not to be taken literally, they indicate what would be used in the code...)

( )

2
New cards

In C, a short int

is at least two bytes in size.

3
New cards

The most appropriate operator to use to set target bits in a byte is

the bitwise OR.

4
New cards

The most appropriate operator to use to flip target bits in a byte is

the bitwise XOR.

5
New cards

The most appropriate operator to use to clear target bits in a byte is

the bitwise AND.

6
New cards

if you need to flip a bit's current state, you should use

the XOR operator.

7
New cards

To specify a literal floating point value as being type double,

no suffix is required.

8
New cards

When applying the bitwise AND on two bits, the only way to get a unique result is if

both bits are set.

9
New cards

If you perform a right shift on a signed positive int

You'll get zeros pushed into the MSBs.

10
New cards

If you perform a right shift on an unsigned int

you'll get zeros pushed into the MSBs.

11
New cards

If you perform a right shift on a signed negative int

the result depends on the compiler.

12
New cards

If you shift a 32-bit integer to the left by 32 positions,

the result is zero.

13
New cards

If you perform a left shift of one position on a signed positive int

you'll effectively multiply the value by two.

14
New cards

If a larger type is assigned to a smaller type,

there may be a loss of data.

15
New cards

An arithmetic type conversion occurs automatically

with expressions of mixed types.

16
New cards

In an assignment type conversion,

the rvalue is temporarily converted to the lvalue's type

17
New cards

In an arithmetic type conversion,

the smaller types are all converted to the largest type.

(also known as "promotion")

18
New cards

To convert a binary set of bits into a hexadecimal value,

each group of four bits should be expressed with a single hexadecimal digit.

19
New cards

If you pass a smaller-type argument to a larger-type parameter, there is no risk in loss of data. T/F

True

20
New cards

The getchar function returns an int because

it allows the caller to test for EOF.