0
0
Blockchain / Solidityprogramming~5 mins

Data types (uint, int, bool, address, string) in Blockchain / Solidity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a uint in blockchain programming?
A uint is an unsigned integer data type that stores only non-negative whole numbers (0 and above). It cannot hold negative values.
Click to reveal answer
beginner
How does an int differ from a uint?
An int is a signed integer that can hold both negative and positive whole numbers, while a uint holds only non-negative numbers.
Click to reveal answer
beginner
What values can a bool data type hold?
A bool can hold only two values: true or false. It is used to represent yes/no or on/off states.
Click to reveal answer
beginner
What is the purpose of the address data type in blockchain?
The <strong>address</strong> type stores a blockchain account's unique identifier. It is used to hold wallet or contract addresses.
Click to reveal answer
beginner
What kind of data does the string type store?
The string type stores text data, like words or sentences, made up of characters.
Click to reveal answer
Which data type can store negative numbers?
Aint
Baddress
Cbool
Duint
What values can a bool hold?
AAny number
BTrue or False
CText strings
DBlockchain addresses
Which data type is used to store a wallet or contract identifier?
Aaddress
Bbool
Cstring
Dint
What type of data does string hold?
ABlockchain addresses
BTrue or False
CNumbers only
DText characters
Which data type cannot hold negative values?
Aint
Bbool
Cuint
Dstring
Explain the difference between int and uint data types.
Think about whether the number can be below zero.
You got /3 concepts.
    Describe the purpose of the address data type in blockchain.
    It holds where money or contracts live on the blockchain.
    You got /3 concepts.