Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'char' which is too small for large numbers.
Using 'float' which is for decimal numbers, not integers.
✗ Incorrect
The unsigned long type modifier allows storing large positive integer values.
2fill in blank
mediumComplete the code to declare a signed short integer variable.
C
[1] short temperature = -20;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'unsigned' which cannot hold negative values.
Using 'float' which is for decimal numbers.
✗ Incorrect
The signed modifier allows the variable to hold negative values.
3fill in blank
hardFix 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'signed' which allows negative numbers.
Using 'float' which is for decimal numbers.
✗ Incorrect
The unsigned modifier is needed to declare an unsigned integer.
4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'unsigned' which cannot hold negative values.
Using 'float' which is for decimal numbers.
✗ Incorrect
long signed int declares a variable that can hold large negative or positive integers.
5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'signed' which allows negative values.
Omitting 'const' which allows value changes.
✗ Incorrect
The declaration const unsigned long int creates a constant variable for large positive integers.