Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Blockchain CBDE Exam - Topic 4 Question 94 Discussion

Single line comments in Solidity are:
B) working with /* comment */ or /** @.. natspec style */
A) working with either // or ///
C) not possible, all comments must be multi-line.

Blockchain CBDE Exam - Topic 4 Question 94 Discussion

Actual exam question for Blockchain's CBDE exam
Question #: 94
Topic #: 4
[All CBDE Questions]

Single line comments in Solidity are:

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Bea
9 months ago
No way, C can't be true! Single-line comments are definitely possible.
upvoted 0 times
...
Irving
10 months ago
B is also valid for natspec, but A is the go-to for single lines.
upvoted 0 times
...
Marilynn
10 months ago
Wait, are you sure about that? I thought only multi-line was allowed.
upvoted 0 times
...
Alba
10 months ago
Totally agree, I've used // in my contracts!
upvoted 0 times
...
Maryanne
10 months ago
A is correct, you can use // for single-line comments.
upvoted 0 times
...
Basilia
10 months ago
I might be confused, but I thought comments could only be multi-line in Solidity.
upvoted 0 times
...
Marilynn
11 months ago
I feel like I've seen questions about comments before, and I think single line comments are just //.
upvoted 0 times
...
Halina
11 months ago
I remember practicing with comments, and I think they were all multi-line, but that seems off now.
upvoted 0 times
...
Leah
11 months ago
I think single line comments use //, but I'm not sure if /// is also valid.
upvoted 0 times
...
Jules
11 months 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.
upvoted 0 times
...
Carissa
11 months 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.
upvoted 0 times
...
Ellen
11 months 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.
upvoted 0 times
...
Annett
11 months 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.
upvoted 0 times
...
Gilma
11 months 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.
upvoted 0 times
...
Providencia
11 months 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?
upvoted 0 times
...
Malcom
11 months 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.
upvoted 0 times
...
Jennifer
11 months ago
This seems like a straightforward question. I'm pretty confident that an employee handbook would be considered a reference guide.
upvoted 0 times
...
Henriette
1 year ago
Solidity without single-line comments? What is this, the dark ages? Option B is the way to go, folks.
upvoted 0 times
Victor
1 year ago
I didn't know you could use natspec style for single-line comments, that's interesting.
upvoted 0 times
...
Sanda
1 year ago
I think // is more convenient for single-line comments, easier to type out.
upvoted 0 times
...
Carma
1 year ago
I prefer using /* comment */ for single-line comments, it's just a personal preference.
upvoted 0 times
...
Twanna
1 year ago
I agree, single-line comments in Solidity are essential for readability.
upvoted 0 times
...
...
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 ///.
upvoted 0 times
...
Kiley
1 year ago
Option C is just ridiculous. Of course Solidity supports single-line comments, I use them all the time!
upvoted 0 times
Gail
1 year ago
Option C is just ridiculous. Of course Solidity supports single-line comments, I use them all the time!
upvoted 0 times
...
Soledad
1 year ago
B) working with /* comment */ or /** @.. natspec style */
upvoted 0 times
...
Linette
1 year ago
A) working with either // or ///
upvoted 0 times
...
...
Merri
1 year ago
Definitely option B. The Natspec style comments are the way to go for single-line comments in Solidity.
upvoted 0 times
Leslee
1 year ago
I didn't know about Natspec style comments, I'll have to give them a try.
upvoted 0 times
...
Kendra
1 year ago
I think both options work, but Natspec style comments are more commonly used in Solidity.
upvoted 0 times
...
Lisbeth
1 year ago
I prefer using // for single-line comments, it's just more convenient for me.
upvoted 0 times
...
Lezlie
1 year ago
I prefer using // for single-line comments, it's just more convenient for me.
upvoted 0 times
...
Christiane
1 year ago
I agree, Natspec style comments are much cleaner and easier to read.
upvoted 0 times
...
Nohemi
1 year ago
I agree, Natspec style comments are much cleaner and easier to read.
upvoted 0 times
...
...
Shawnta
1 year ago
I agree with Mary, A is the correct answer because // or /// are commonly used for single line comments in Solidity.
upvoted 0 times
...
Mary
1 year ago
I think A is correct, single line comments in Solidity are usually done with // or ///.
upvoted 0 times
...
Tammi
1 year ago
A) working with either // or ///
upvoted 0 times
...
Louisa
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.
upvoted 0 times
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.
upvoted 0 times
...
Stephanie
1 year ago
B) working with /* comment */ or /** @.. natspec style */
upvoted 0 times
...
Lisandra
1 year ago
A) working with either // or ///
upvoted 0 times
...
...

Save Cancel