Single line comments in Solidity are:
Suggested Answer: B
Get Premium CBDE Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
41 comments · newest first
BE
Bea
11 months ago
No way, C can't be true! Single-line comments are definitely possible.
IR
Irving
11 months ago
B is also valid for natspec, but A is the go-to for single lines.
MA
Marilynn
11 months ago
Wait, are you sure about that? I thought only multi-line was allowed.
AL
Alba
12 months ago
Totally agree, I've used // in my contracts!
MA
Maryanne
12 months ago
A is correct, you can use // for single-line comments.
BA
Basilia
12 months ago
I might be confused, but I thought comments could only be multi-line in Solidity.
MA
Marilynn
1 year ago
I feel like I've seen questions about comments before, and I think single line comments are just //.
HA
Halina
1 year ago
I remember practicing with comments, and I think they were all multi-line, but that seems off now.
LE
Leah
1 year ago
I think single line comments use //, but I'm not sure if /// is also valid.
JU
Jules
1 year ago
Okay, I've got this. Single-line comments in Solidity can use either // or ///. The question is asking specifically about single-line comments, so I'll select option A.
CA
Carissa
1 year ago
I'm a little confused by this question. I thought Solidity only had multi-line comments, not single-line ones. But I'll give it my best shot and go with option B.
EL
Ellen
1 year ago
Ah, I remember learning about this in class. Single-line comments in Solidity can use either // or ///. Option A seems to be the correct answer here.
AN
Annett
1 year ago
I'm pretty confident on this one. I know Solidity supports both single-line comments with // and multi-line comments with /* and /**. The question is asking specifically about single-line comments, so I'll go with option A.
GI
Gilma
1 year ago
Hmm, I'm a bit unsure about this. I thought Solidity only supported multi-line comments, not single-line ones. I'll have to think this through carefully before answering.
PR
Providencia
1 year ago
The key here is portability, so I'd say the CDS disk format is the way to go. That's designed to work across different operating systems, right?
MA
Malcom
1 year ago
I remember practicing a similar question where we discussed the necessity of having one entry for the Active server and one for the Standby server, but I can't recall all the details.
JE
Jennifer
1 year ago
This seems like a straightforward question. I'm pretty confident that an employee handbook would be considered a reference guide.
HE
Henriette
1 year ago
Solidity without single-line comments? What is this, the dark ages? Option B is the way to go, folks.
VI
Victor
1 year ago
I didn't know you could use natspec style for single-line comments, that's interesting.
SA
Sanda
1 year ago
I think // is more convenient for single-line comments, easier to type out.
CA
Carma
1 year ago
I prefer using /* comment */ for single-line comments, it's just a personal preference.
TW
Twanna
1 year ago
I agree, single-line comments in Solidity are essential for readability.
AN
Annita
1 year ago
I always forget which one is the single-line comment... Hmm, let me think... Ah, got it! It's option A, the good old // or ///.
KI
Kiley
1 year ago
Option C is just ridiculous. Of course Solidity supports single-line comments, I use them all the time!
GA
Gail
1 year ago
Option C is just ridiculous. Of course Solidity supports single-line comments, I use them all the time!
SO
Soledad
1 year ago
B) working with /* comment */ or /** @.. natspec style */
LI
Linette
1 year ago
A) working with either // or ///
ME
Merri
2 years ago
Definitely option B. The Natspec style comments are the way to go for single-line comments in Solidity.
LE
Leslee
1 year ago
I didn't know about Natspec style comments, I'll have to give them a try.
KE
Kendra
1 year ago
I think both options work, but Natspec style comments are more commonly used in Solidity.
LI
Lisbeth
1 year ago
I prefer using // for single-line comments, it's just more convenient for me.
LE
Lezlie
1 year ago
I prefer using // for single-line comments, it's just more convenient for me.
CH
Christiane
1 year ago
I agree, Natspec style comments are much cleaner and easier to read.
NO
Nohemi
1 year ago
I agree, Natspec style comments are much cleaner and easier to read.
SH
Shawnta
2 years ago
I agree with Mary, A is the correct answer because // or /// are commonly used for single line comments in Solidity.
MA
Mary
2 years ago
I think A is correct, single line comments in Solidity are usually done with // or ///.
TA
Tammi
2 years ago
A) working with either // or ///
LO
Louisa
2 years ago
A and B seem correct, but I'm not sure which one is the single-line comment syntax specifically. Guess I'll have to review my Solidity documentation.
LI
Ligia
1 year ago
A and B seem correct, but I'm not sure which one is the single-line comment syntax specifically. Guess I'll have to review my Solidity documentation.
ST
Stephanie
1 year ago
B) working with /* comment */ or /** @.. natspec style */
LI
Lisandra
1 year ago
A) working with either // or ///