Pageviews

Tuesday, 28 July 2020

+2].10 - Server side scripting using PHP - Solved questions from text book



                               PLUS TWO  COMPUTER SCIENCE

                                     Chapter 10. Server Side Scripting Using PHP

                           (+2. Computer Science Questions and answers from text book)





1. PHP stands for 
 
Ans. PHP hypertext preprocessors

2.  php file have a default  file extension of

   Ans. .php

3. Who is known as the father of php?

  Ans. Rasmus Lerdorf

4. In php ---------- is used for a single line comment

   Ans. //(double slash)

5. WAMP stands for

  Ans. Windows,Apache,Mysql,php

6. LAMP stands for

   Ans. Linux,Apache,Mysql,php

7. php script start with ------- and end with -------------

Ans. <? and ?>

8. Varaibles always start with a php in

  Ans. $

9. The php syntax is similar to that of language

  Ans. C++

10. The dot(.)operator is used for -------

  Ans. Concatenating operator

11. Arrays that used string keys are called

   Ans. Associative Arrays

12. -------------- function is used in php to return the length of the string

   Ans. strlen()

13. Multiple outputs can be made only with -------- command

   Ans.  echo

14. In php  by default array index starts from

  Ans. zero

15. GET can only send -------- characters.

  Ans. 2000

16. What is php?

    PHP is an acronym for "PHP: Hypertext Preprocessor.PHP is a widely-used, open source scripting language .PHP scripts are executed on the server.PHP is free to download and use.

 17. What is the difference between php and javascipt?

       PHP is server-side scripting language whereas Javascript is a client-side scripting language. PHP doesn't execute within browser whereas Javascript executes within browser. PHP supports database whereas Javascript doesn't support databases. PHP accepts both upper case and lower case variables while Javascript doesn't.

18. What is the use of  ' echo' in php?

      Multiple outputs can be made only with echo command.

19. What is the use of "print" in php?

    It used to display output.
 
20. Which character is used to terminate a php statement?Name one situation  where  omitting this termination character  doesnot produce an error?

    Semicolon(;) character is used to terminate a php statement.For the last statement of php code semicolon is not compulsory.