0
0
Cprogramming~10 mins

Type modifiers in C - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare a variable that can hold a large integer value.

C
unsigned [1] bigNumber = 4294967295;
Drag options to blanks, or click blank then click option'
Aint
Blong
Cchar
Dfloat
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'char' which is too small for large numbers.
Using 'float' which is for decimal numbers, not integers.
2fill in blank
medium

Complete the code to declare a signed short integer variable.

C
[1] short temperature = -20;
Drag options to blanks, or click blank then click option'
Aunsigned
Bfloat
Csigned
Dlong
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'unsigned' which cannot hold negative values.
Using 'float' which is for decimal numbers.
3fill in blank
hard

Fix the error in the code to declare a constant unsigned integer.

C
const [1] int maxScore = 100;
Drag options to blanks, or click blank then click option'
Asigned
Blong
Cfloat
Dunsigned
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'signed' which allows negative numbers.
Using 'float' which is for decimal numbers.
4fill in blank
hard

Fill both blanks to declare a long signed integer variable.

C
[1] [2] int distance = -1000;
Drag options to blanks, or click blank then click option'
Along
Bunsigned
Csigned
Dfloat
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'unsigned' which cannot hold negative values.
Using 'float' which is for decimal numbers.
5fill in blank
hard

Fill all three blanks to declare a constant unsigned long integer variable.

C
const [1] [2] [3] number = 50000;
Drag options to blanks, or click blank then click option'
Aunsigned
Blong
Cint
Dsigned
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'signed' which allows negative values.
Omitting 'const' which allows value changes.