14
Jan

C language question?

Author: admin

Which type of comment indicator should you use if your comment exceeds a single line?

a) // comment here */

b) /* comment here */

c) // comment here

d) // comment here //

I'm 90% its c) but I'm just making sure.


Answer:
b) …… it can span multiple lines whereas the " // " is limited to single line and must be repeated on every comment-line

Answer:
// comments a single line

/* comments a huge sections */


Answer:
From what i remember of my programming days its // then the line goes green, however this must be done to each individual line of code. which is stupid, take not i did Java but i'm 90% sure its the same

Answer:
The format in (b) is the only one which spans multiple lines. A comment opened with // is implicitly closed at the end of a line. A comment opened with /* must be explicitly closed with a */.

Answer:
B would be the correct answer for anything over 1 line,

C would be for a single line.

although you can just go

//this

//is

//multiple

//lines


Answer:
Definitely B.

Answer:
It's most DEFINITELY c)

100% sure


Answer:
My software engineer husband say you can use either b or c

B if it's a paragraph or more

C if it's a few lines

D could work too, but it's not standard.


Answer:
Have taken several C classes, it's B if it's more than one line, C if just one.

Answer:
c is used if the comment is only one line.

the correct answer is b.

Book Mark it-> del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Netscape | Yahoo | BlinkList

Tags: ,

This entry was posted on Monday, January 14th, 2008 at 10:13 pm and is filed under Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or TrackBack URI from your own site.

Leave a reply

Name (*)
Mail (*)
URI
Comment