Complete the code to declare a reference type variable in Solidity.
string memory [1] = "hello";
In Solidity, string memory declares a reference type variable named greeting.
Complete the code to assign a reference type variable to another in Solidity.
string memory name1 = "Alice"; string memory [1] = name1;
Assigning name1 to name2 copies the reference type string in memory.
Fix the error in the function parameter declaration for a reference type in Solidity.
function setName(string [1] newName) public {
name = newName;
}storage instead of memory for function parameters.Function parameters of reference types must be declared with memory to indicate temporary data.
Fill both blanks to correctly declare and assign a dynamic array reference type in Solidity.
uint[] [1]; [2] = new uint[](5);
The variable numbers is declared as a dynamic array and then initialized with length 5.
Fill all three blanks to create a mapping from address to a dynamic array of uint in Solidity.
mapping([1] => [2]) public [3];
This mapping links each address to a dynamic array of uint called balances.