<style>.lazy{display:none}</style>Тест по Solidity (en)

Тест по Solidity (en)

1 / 10

Which of the following is NOT a primitive data type in Solidity?

Не верно!

In Solidity, string is not a primitive data type. While uint256, address, and enum are primitive data types, strings are treated as dynamic data types in Solidity.


Верно!

Не верно!

In Solidity, string is not a primitive data type. While uint256, address, and enum are primitive data types, strings are treated as dynamic data types in Solidity.


Не верно!

In Solidity, string is not a primitive data type. While uint256, address, and enum are primitive data types, strings are treated as dynamic data types in Solidity.


What is the primary difference between constants and immutables in Solidity?

Не верно!

Constants are assigned values during contract deployment and cannot be modified afterward. Immutables are similar but are allocated a storage slot, which can be changed during contract deployment if necessary.


Не верно!

Constants are assigned values during contract deployment and cannot be modified afterward. Immutables are similar but are allocated a storage slot, which can be changed during contract deployment if necessary.


Верно!

Не верно!

Constants are assigned values during contract deployment and cannot be modified afterward. Immutables are similar but are allocated a storage slot, which can be changed during contract deployment if necessary.


Which keyword is used to read the value of a state variable in Solidity?

Не верно!

The view keyword is used to indicate that a function does not modify the state of the contract and can be used to read the value of a state variable.


Не верно!

The view keyword is used to indicate that a function does not modify the state of the contract and can be used to read the value of a state variable.


Верно!

Не верно!

The view keyword is used to indicate that a function does not modify the state of the contract and can be used to read the value of a state variable.


What is the purpose of gas in Ethereum and Solidity?

Не верно!

Gas is used to pay for transaction execution and contract computations on the Ethereum network. It ensures that computational work is fairly compensated.


Верно!

Не верно!

Gas is used to pay for transaction execution and contract computations on the Ethereum network. It ensures that computational work is fairly compensated.


Не верно!

Gas is used to pay for transaction execution and contract computations on the Ethereum network. It ensures that computational work is fairly compensated.


What is a mapping in Solidity?

Не верно!

A mapping in Solidity is a data structure that associates keys with values, similar to a dictionary or hash map in other programming languages.


Не верно!

A mapping in Solidity is a data structure that associates keys with values, similar to a dictionary or hash map in other programming languages.


Не верно!

A mapping in Solidity is a data structure that associates keys with values, similar to a dictionary or hash map in other programming languages.


Верно!

Which of the following best describes an enum in Solidity?

Не верно!

An enum in Solidity is a data type used to define a set of named constant values, typically representing a finite set of options or states.


Верно!

Не верно!

An enum in Solidity is a data type used to define a set of named constant values, typically representing a finite set of options or states.


Не верно!

An enum in Solidity is a data type used to define a set of named constant values, typically representing a finite set of options or states.


Which data location is used for function arguments in Solidity?

Не верно!

Function arguments in Solidity are typically stored in the calldata data location. This location is read-only and used to store function inputs.


Не верно!

Function arguments in Solidity are typically stored in the calldata data location. This location is read-only and used to store function inputs.


Верно!

What is the primary purpose of a function modifier in Solidity?

Не верно!

A function modifier in Solidity is used to modify the behavior of a function. It allows you to add custom logic before or after the execution of a function.


Не верно!

A function modifier in Solidity is used to modify the behavior of a function. It allows you to add custom logic before or after the execution of a function.


Верно!

Не верно!

A function modifier in Solidity is used to modify the behavior of a function. It allows you to add custom logic before or after the execution of a function.


What is the main use of events in Solidity?

Не верно!

Events in Solidity are primarily used to trigger off-chain actions and log important contract events. They provide a way to communicate with external applications and monitor contract activity.


Не верно!

Events in Solidity are primarily used to trigger off-chain actions and log important contract events. They provide a way to communicate with external applications and monitor contract activity.


Верно!

Не верно!

Events in Solidity are primarily used to trigger off-chain actions and log important contract events. They provide a way to communicate with external applications and monitor contract activity.


In Solidity, which keyword is used for conditional branching?

Не верно!

The if and else keywords are used for conditional branching in Solidity, allowing you to make decisions based on conditions.


Верно!

Не верно!

The if and else keywords are used for conditional branching in Solidity, allowing you to make decisions based on conditions.


Далее
0 из 10

Поздравляем с прохождением теста! А теперь предлагаем почитать статьи по тестированию на нашем сайте!

Интересно, хочу попробовать