Register|Login

Have a question? Click here to ask the community.

Quiz 3 – Comments

| In: PHP Quizzes | 32,228 views

*You are currently not logged in and your quiz score will not be recorded. Please login or register if you would like to submit your quiz score.

Directions: Answer all questions. Any questions skipped will be scored as wrong answers. ! :)

1. Which is the incorrect way to start a single line PHP comment?

//
#
/* … */

2. Which is the correct way to write a multiple line PHP comment?

//
#
/* … */

3. How many single line commenting types are there?

1
5
3
2

4. Writing comments is considered a bad programming practice?

True
False

5. All text in a multiple line comment block is ignored?

True
False

6. All text to the right of a single line comment is not ignored?

True
False

7. Look at the following code and determine what will be displayed in the browser:

<?php
echo “Hello World 1”;
// echo “Hello World 2”;
?>

Hello World 1 Hello World 2
Hello World 2
Hello World 1
Hello World 2 Hello World 1



5 Responses to Quiz 3 – Comments

Avatar

Edward

October 13th, 2011 at 1:12 am

I have a feeling the answer to question 1 is the first answer, not the third. Correct me if I’m wrong. I am new to this.

Avatar

luke

December 11th, 2011 at 9:41 pm

Edward the question is which one is the ‘incorrect one’. So the first one is the correct one, the 3rd one is the one is the one for multiple line comments. I read it wrong too.

Avatar

ala

January 6th, 2012 at 4:39 pm

thank you, thats good job

Avatar

Parkar

June 11th, 2014 at 6:48 pm

After quiz i feel better & very confident

Avatar

PraveenBadiger

April 25th, 2016 at 6:22 pm

We can use all the following to make a single line comment. But only /*……*/ can be used for multi-line comments. Options to make a single line comment can be done using these: // # /* … */

Comment Form

You must be logged in to post a comment.

Users Online

Users Online: 6 Users

Most Users Ever Online: 91

Quiz Scores

Advertisments