ExamGecko
Home / Blockchain / CBDE / List of questions
Ask Question

Blockchain CBDE Practice Test - Questions Answers, Page 5

List of questions

Question 41

Report Export Collapse

Solidity files:

can't be split across multiple files, everything should be in one single file.
can't be split across multiple files, everything should be in one single file.
can be split across multiple files, but every contract must be in a file with the same name as the contract itself.
can be split across multiple files, but every contract must be in a file with the same name as the contract itself.
can be spread across multiple files. To import all contract from a file you can use "import 'myfile.sol'. To import Contract MyContract from myfile.sol you use "import {MyContract as SomeContract} from 'myfile.sol';".
can be spread across multiple files. To import all contract from a file you can use "import 'myfile.sol'. To import Contract MyContract from myfile.sol you use "import {MyContract as SomeContract} from 'myfile.sol';".
Suggested answer: C
asked 16/09/2024
Noor Amy
44 questions

Question 42

Report Export Collapse

Files can be imported:

using relative and absolute paths, where the "." And the ".." depict that it's a relative path.
using relative and absolute paths, where the "." And the ".." depict that it's a relative path.
only via GitHub using the Repository and Username.
only via GitHub using the Repository and Username.
using the special requirefile(...) statement, which looks in a specific library path to import files.
using the special requirefile(...) statement, which looks in a specific library path to import files.
Suggested answer: A
asked 16/09/2024
Massimo Cerqui
42 questions

Question 43

Report Export Collapse

Importing from GitHub:

works across all compilers and platforms the same way.
works across all compilers and platforms the same way.
is generally possible, but currently works only in Remix, but doesn't work in Truffle.
is generally possible, but currently works only in Remix, but doesn't work in Truffle.
Suggested answer: B
asked 16/09/2024
Shan Panikker
34 questions

Question 44

Report Export Collapse

Single line comments in Solidity are:

working with either // or ///
working with either // or ///
working with /* comment */ or /** @.. natspec style */
working with /* comment */ or /** @.. natspec style */
not possible, all comments must be multi-line.
not possible, all comments must be multi-line.
Suggested answer: A
asked 16/09/2024
carlos salgado
43 questions

Question 45

Report Export Collapse

Multi-Line Comments in Solidity are:

working with either // or ///
working with either // or ///
working with /* comment */ or /** @.. natspec style */
working with /* comment */ or /** @.. natspec style */
not possible, all comments must be single-line.
not possible, all comments must be single-line.
Suggested answer: B
asked 16/09/2024
Aidan Lear
53 questions

Question 46

Report Export Collapse

The following are value types in Solidity.

Integer, Boolean, Struct, Mapping and Enum.
Integer, Boolean, Struct, Mapping and Enum.
Integer, Boolean, Enum and Addresses.
Integer, Boolean, Enum and Addresses.
Integer, Boolean, Structs and Fixed Point Numbers.
Integer, Boolean, Structs and Fixed Point Numbers.
Suggested answer: B
asked 16/09/2024
Spandana Gangavaram
35 questions

Question 47

Report Export Collapse

To compare a String in Solidity you use:

string1 == string2
string1 == string2
the internal function "str_compare(str1,str2)"
the internal function "str_compare(str1,str2)"
you can't directly compare two strings, but one method would be to hash both strings and compare the hashes.
you can't directly compare two strings, but one method would be to hash both strings and compare the hashes.
bytes32(string1) == bytes32(string2)
bytes32(string1) == bytes32(string2)
Suggested answer: C
asked 16/09/2024
Brad Jarrett
49 questions

Question 48

Report Export Collapse

If we divide two integers:

5/2, the result is:

2, because the decimal is truncated.
2, because the decimal is truncated.
3, because it's always rounded.
3, because it's always rounded.
2.5, because it's automatically converted into a float.
2.5, because it's automatically converted into a float.
Suggested answer: A
asked 16/09/2024
Andrew Kavanagh
41 questions

Question 49

Report Export Collapse

A

Struct is a great way:

to define a new datatype in Solidity, so you don't need to use objects of another contract.
to define a new datatype in Solidity, so you don't need to use objects of another contract.
to hold instances of other contracts.
to hold instances of other contracts.
to implement pointers to other contracts that can hold new datatypes.
to implement pointers to other contracts that can hold new datatypes.
Suggested answer: A
asked 16/09/2024
Francesco Balducci
40 questions

Question 50

Report Export Collapse

A Mapping consists of keys and value.

the Keys can be anything, but the value can't be another mapping or struct.
the Keys can be anything, but the value can't be another mapping or struct.
the Value can be anything, but the key cannot be another mapping, struct, integer or Boolean.
the Value can be anything, but the key cannot be another mapping, struct, integer or Boolean.
the value can be anything, but the key cannot be another mapping, struct, enum or dynamically sized array.
the value can be anything, but the key cannot be another mapping, struct, enum or dynamically sized array.
Suggested answer: C
asked 16/09/2024
David Hartnett
51 questions
Total 102 questions
Go to page: of 11