Solidity files:
Suggested Answer: C
Get Premium CBDE Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
29 comments · newest first
JA
Jaime
11 months ago
B is misleading, contracts can be in different files without name matching.
EL
Elouise
11 months ago
Wait, can you really import like that? Sounds complicated.
RU
Ruby
11 months ago
Totally agree with C, importing is super useful!
SH
Shoshana
12 months ago
I thought everything had to be in one file, guess I was wrong!
FR
Franchesca
12 months ago
C is correct, you can definitely split files!
AL
Alonso
12 months ago
I remember discussing file structures in class, and I think we concluded that contracts can be in multiple files, so C seems correct.
CL
Clay
1 year ago
I’m a bit confused. I thought everything had to be in one file, but I also recall something about imports.
FR
Franklyn
1 year ago
I practiced a question similar to this, and I believe you can import contracts from other files. Option C sounds right to me.
GL
Glory
1 year ago
I think I remember that Solidity files can be split, but I'm not sure about the naming conventions for the files.
MI
Miesha
1 year ago
I'm pretty confident that C is the right answer here. Solidity's modular design allows you to split your code across multiple files and import the parts you need. This is a useful feature for organizing larger projects.
DO
Dorcas
1 year ago
Option C sounds right to me. I remember learning that you can use the import statement to bring in contracts from other files. That gives you a lot of flexibility in how you structure your Solidity projects.
AJ
Aja
1 year ago
Hmm, I'm a bit unsure about this one. I know Solidity has some flexibility with file organization, but I'll need to double-check the details to make sure I select the right answer.
RA
Rashida
1 year ago
I think option C is the correct answer. Solidity allows you to split your code across multiple files and import contracts as needed.
KA
Kallie
1 year ago
Wait, so I can't just name my contract file whatever I want? That's a bit of a bummer, but I guess it makes sense for organization.
RE
Rene
1 year ago
Haha, trying to put everything in one file would be a nightmare! I'm glad Solidity allows us to modularize our code.
LE
Leah
1 year ago
It definitely makes the code more manageable.
RO
Ronald
1 year ago
I prefer to keep my contracts organized in separate files.
TY
Ty
1 year ago
Yes, it's great that Solidity allows us to split our code across multiple files.
ER
Erasmo
1 year ago
I agree, having everything in one file would be a mess.
RO
Rose
1 year ago
I was hoping for a simpler answer, but C seems to be the right choice. Guess I'll have to get used to that import syntax.
HE
Herman
1 year ago
C) 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';'.
RA
Raul
1 year ago
B) can be split across multiple files, but every contract must be in a file with the same name as the contract itself.
DO
Dortha
1 year ago
A) can't be split across multiple files, everything should be in one single file.
CA
Carmelina
2 years ago
Hmm, I see your point. Maybe I should reconsider my answer.
AL
Albert
2 years ago
Option C sounds like the way to go. Being able to split my code across multiple files and selectively import what I need is really important for large-scale projects.
RA
Rashad
1 year ago
Yes, it definitely helps with keeping things organized and makes it easier to maintain and update the codebase.
CH
Chandra
1 year ago
I agree, having the flexibility to organize your code in separate files is crucial for managing complexity.
AL
Albert
2 years ago
I disagree, I believe the answer is C. You can import contracts from multiple files.
CA
Carmelina
2 years ago
I think the answer is A, everything should be in one single file.