0% found this document useful (0 votes)
11 views55 pages

MCQ Sybbaca Ca-304 PHP

Uploaded by

RED TAB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views55 pages

MCQ Sybbaca Ca-304 PHP

Uploaded by

RED TAB
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Unit 1 : PHP Basics

1. What does PHP stand for?

i) Personal Home Page

ii) Hypertext Preprocessor

iii) Pretext Hypertext Processor

iv) Preprocessor Home Page

a) Both i) and iii)


b) Both ii) and iv)
c) Only ii)
d) Both i) and ii)
View Answer
Answer: d
2. PHP files have a default file extension of_______
a) .html
b) .xml
c) .php
d) .ph

Answer: c

3. What should be the correct syntax to write a PHP code?


a) < php >
b) < ? php ?>
c) <? ?>
d) <?php ?>

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

4. Which of the following is/are a PHP code editor?

i) Notepad

ii) Notepad++

iii) Adobe Dreamweaver

iv) PDT

a) Only iv)
b) i), ii), iii) and iv)
c) i), ii) and iii)
d) Only iii)

Answer: b

5. Which of the following must be installed on your computer so as to run PHP script?

i) Adobe Dreamweaver

ii) XAMPP

iii) Apache and PHP

iv) IIS

a) i), ii), iii) and iv)


b) Only ii)
c) ii) and iii)
d) ii), iii) and iv)

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

6. Which version of PHP introduced Try/catch Exception?


a) PHP 4
b) PHP 5
c) PHP 6
d) PHP 5 and later

Answer: d

7. How should we add a single line comment in our PHP code?

i) /?

ii) //

iii) #

iv) /* */

a) Only ii)
b) i), iii) and iv)
c) ii), iii) and iv)
d) Both ii) and iv)

Answer: c

8. Which of the following PHP statement/statements will store 111 in variable num?

int $num = 111;


int mum = 111;
$num = 111;
111 = $num;
a) Both i) and ii)
b) i), ii), iii) and iv)
c) Only iii)
d) Only i)

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

9. What will be the output of the following PHP code?

1. <?php
2. $num = 1;
3. $num1 = 2;
4. print $num . "+". $num1;
5. ?>
a) 3
b) 1+2
c) 1.+.2
d) Error

Answer: b

10. What will be the output of the following PHP code?

1. <?php
2. $num = "1";
3. $num1 = "2";
4. print $num+$num1;
5. ?>
a) 3
b) 1+2
c) Error
d) 12

Answer: a

11. Which is the right way of declaring a variable in PHP?

i) $3hello
ii) $_hello
iii) $this
iv) $This

a) Only ii)
b) Only iii)
c) ii), iii) and iv)
d) ii) and iv)

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: d

12. What will be the output of the following PHP code?

1. <?php
2. $foo = 'Bob';
3. $bar = &$foo;
4. $bar = "My name is $bar";
5. echo $bar;
6. echo $foo;
7. ?>

a) Error
b) My name is BobBob
c) My name is BobMy name is Bob
d) My name is Bob Bob

Answer: c

13. Which of the following PHP statements will output Hello World on the screen?

i) echo ("Hello World");


ii) print ("Hello World");
iii) printf ("Hello World");
iv) sprintf ("Hello World");

a) i) and ii)
b) i), ii) and iii)
c) i), ii), iii) and iv)
d) i), ii) and iv)

Answer: b

14. What will be the output of the following PHP code?

1. <?php
2. $color = "maroon";
3. $var = $color[2];
4. echo "$var";
5. ?>

a) a
b) Error
c) $var
d) r

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: d

15. What will be the output of the following PHP code?

1. <?php
2. $score = 1234;
3. $scoreboard = (array) $score;
4. echo $scoreboard[0];
5. ?>

a) 1
b) Error
c) 1234
d) 2

Answer: c

16. What will be the output of the following PHP code?

1. <?php
2. $total = "25 students";
3. $more = 10;
4. $total = $total + $more;
5. echo "$total";
6. ?>

a) Error
b) 35 students
c) 35
d) 25 students

Answer: c

17. Which of the below statements is equivalent to $add += $add?


a) $add = $add
b) $add = $add +$add
c) $add = $add + 1
d) $add = $add + $add + 1

Answer: b

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

18. Which statement will output $x on the screen?


a) echo “\$x”;
b) echo “$$x”;
c) echo “/$x”;
d) echo “$x;”;

Answer: a

19. What will be the output of the following PHP code?

1. <?php
2. function track() {
3. static $count = 0;
4. $count++;
5. echo $count;
6. }
7. track();
8. track();
9. track();
10. ?>

a) 123
b) 111
c) 000
d) 011

Answer: a

20. What will be the output of the following PHP code?

1. <?php
2. $a = "clue";
3. $a .= "get";
4. echo "$a";
5. ?>

a) get
b) true
c) false
d) clueget

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

21. What will be the output of the following PHP code?

1. <?php
2. $a = 5;
3. $b = 5;
4. echo ($a === $b);
5. ?>

a) 5 === 5
b) Error
c) 1
d) False

Answer: c

22. Which of the below symbols is a newline character?


a) \r
b) \n
c) /n
d) /r

Answer: b

23) What will be the output of the following PHP code?

1. <?php
2. $num = 10;
3. echo 'What is her age? \n She is $num years old';
4. ?>
a) What is her age? \n She is $num years old
b) What is her age?She is $num years old

c) What is her age? She is 10 years old

d) What is her age? She is 10 years old

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

24. Which of the conditional statements is/are supported by PHP?

i) if statements

ii) if-else statements

iii) if-elseif statements

iv) switch statements

a) Only i)
b) i), ii) and iv)
c) ii), iii) and iv)
d) i), ii), iii) and iv)

Answer: d

25. What will be the output of the following PHP code?

1. <?php
2. $team = "arsenal";
3. switch ($team) {
4. case "manu":
5. echo "I love man u";
6. case "arsenal":
7. echo "I love arsenal";
8. case "manc":
9. echo "I love manc"; }
10. ?>

a) I love arsenal
b) Error
c) I love arsenalI love manc
d) I love arsenalI love mancI love manu

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

26. Which of the looping statements is/are supported by PHP?

i) for loop

ii) while loop

iii) do-while loop

iv) foreach loop

Answer: c

27. What will be the output of the following PHP code?

1. <?php
2. $user = array("Ashley", "Bale", "Shrek", "Blank");
3. for ($x=0; $x < count($user); $x++) {
4. if ($user[$x] == "Shrek") continue;
5. printf ($user[$x]);
6. }
7. ?>

a) AshleyBale
b) AshleyBaleBlank
c) ShrekBlank
d) Shrek

Answer: b

28. If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?


a) 12
b) 1
c) Error
d) 5

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

29. What will be the value of $a and $b after the function call in the following PHP code?

1. <?php
2. function doSomething( &$arg ) {
3. $return = $arg;
4. $arg += 1;
5. return $return;
6. }
7. $a = 3;
8. $b = doSomething( $a );
9. ?>

a) a is 3 and b is 4
b) a is 4 and b is 3
c) Both are 3
d) Both are 4

Answer: b

30. Who is the father of PHP?


a) Rasmus Lerdorf
b) Willam Makepiece
c) Drek Kolkevi
d) List Barely

Answer: a

31.This set of PHP Multiple Choice Questions & Answers (MCQs) focuses on
“Functions”.

1. How to define a function in PHP?


a) function {function body}
b) data type functionName(parameters) {function body}
c) functionName(parameters) {function body}
d) function functionName(parameters) {function body}

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

32. Which type of function call is used in line 8 in the following PHP code?

1. <?php
2. function calc($price, $tax)
3. {
4. $total = $price + $tax;
5. }
6. $pricetag = 15;
7. $taxtag = 3;
8. calc($pricetag, $taxtag);
9. ?>

a) Call By Value
b) Call By Reference
c) Default Argument Value
d) Type Hinting

Answer: a

33. What will be the output of the following PHP code?

1. <?php
2. function calc($price, $tax="")
3. {
4. $total = $price + ($price * $tax);
5. echo "$total";
6. }
7. calc(42);
8. ?>

a) Error
b) 0
c) 42
d) 84

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

34. Which of the following are valid function names?

i) function()
ii) €()
iii) .function()
iv) $function()

a) Only i)
b) Only ii)
c) i) and ii)
d) iii) and iv)

Answer: b

35. What will be the output of the following PHP code?

1. <?php
2. function a()
3. {
4. function b()
5. {
6. echo 'I am b';
7. }
8. echo 'I am a';
9. }
10. a();
11. a();
12. ?>

a) I am a
b) I am bI am a
c) Error
d) I am a Error

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

36. What will be the output of the following PHP code?

1. <?php
2. function a()
3. {
4. function b()
5. {
6. echo 'I am b';
7. }
8. echo 'I am a';
9. }
10. b();
11. a();
12. ?>

a) I am b
b) I am bI am a
c) Error
d) I am a Error

Answer: c

37. What will be the output of the following PHP code?

1. <?php
2. $op2 = "blabla";
3. function foo($op1)
4. {
5. echo $op1;
6. echo $op2;
7. }
8. foo("hello");
9. ?>

a) helloblabla
b) Error
c) hello
d) helloblablablabla

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

38. A function in PHP which starts with __ (double underscore) is known as __________
a) Magic Function
b) Inbuilt Function
c) Default Function
d) User Defined Function

Answer: a

39. What will be the output of the following PHP code?

1. <?php
2. function foo($msg)
3. {
4. echo "$msg";
5. }
6. $var1 = "foo";
7. $var1("will this work");
8. ?>

a) Error
b) $msg
c) 0
d) Will this work

Answer: d

40. This set of PHP Multiple Choice Questions & Answers (MCQs) focuses on “In-Built
Functions in PHP”.

1. Which of the following PHP functions accepts any number of parameters?


a) func_get_argv()
b) func_get_args()
c) get_argv()
d) get_argc()

Answer: b

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

41. Which one of the following PHP functions can be used to find files?
a) glob()
b) file()
c) fold()
d) get_file()

Answer: a

42. Which of the following PHP functions can be used to get the current memory usage?
a) get_usage()
b) get_peak_usage()
c) memory_get_usage()
d) memory_get_peak_usage()

Answer: c

43. Which of the following PHP functions can be used for generating unique ids?
a) uniqueid()
b) id()
c) md5()
d) mdid()

Answer: a

44. Which one of the following functions can be used to compress a string?
a) zip_compress()
b) zip()
c) compress()
d) gzcompress()

Answer: d

45. What will be the output of the following PHP code?

1. <?php
2. echo chr(52);
3. ?>

a) 1
b) 2
c) 3
d) 4

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

46. What will be the output of the following PHP code?

1. <?php
2. echo ord ("hi");
3. ?>

a) 106
b) 103
c) 104
d) 209

Answer: c

47. What will be the output of the following PHP code?

1. <?php
2. $str = "Hello World";
3. echo wordwrap($str,5,"<br>\n");
4. ?>

a) Hello World
b) Hello World

c) Hellow worlds

d) none of these

48. What will be the output of the following PHP code?

1. <?php
2. echo ucwords("i love my country");
3. ?>

a) I love my country
b) i love my Country
c) I love my Country
d) I Love My Country

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

49. What will be the output of the following PHP code?

1. <?php
2. echo lcfirst("welcome to India");
3. ?>

a) welcome to India
b) welcome to india
c) Welcome to India
d) Welcome to india

Answer: a

50. Type Hinting was introduced in which version of PHP?


a) PHP 4
b) PHP 5
c) PHP 5.3
d) PHP 6

Answer: b

------------------------------------------------------------------

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Unit 2 : Control Structures and Loops

1)PHP is a server scripting language, and a powerful tool for making _____and
________Web pages.

a) dynamic , interactive Web pages.

b) client page, data base

c) static , interactive

d) object , SPA

Answer: a

2) Php is a___________, it is used to create the object…

a) Static programming language

b) dynamic programming language

c) object oriented programming language

d) object based programming language

Answer: c

3) The default file extension for PHP files is _____

a) .object

b) .php

c) .ph

d) .js

Answer: b

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

4) _______ used to show the out put …or give message..same as printf in c
language…

a) Echo

b) printf

c) print

d) 4)cout

Answer: a

5) PHP is an acronym for "_________" it is widely-used, open source scripting


language.

a) Hypter text language

b) Hypertext Microprocessor

c) Hypertext Pre-processor

d) pich Hypertext program.

Answer: c

6) PHP does not supports the following data types:

a) null

b) 2)Boolean

c) Array

d) ampersand(&)

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

7) PHP does not divides the operators in the following

a) Logical operators

b) String operators

c) Array operators

d) Boolean

Answer: d

8) _________this operator is used to concatenate the two world or with variable.

a) +

b) &&

c) &

d) .

Answer: d

9) _______ is the assignment operator it is used to to assign the value of right


hand side to left hand side.

a) +

b) =

c) --

d) ;

Answer: b

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

10) _______ this operator is used to check the both condition

a) <>

b) &&

c) &

d) ?

Answer: b

11) A ______ data types is used for logical data it represents two possible states:
TRUE or FALSE.

a) integer

b) Null

c) Array

d) Boolean

Answer: d

12) The _______keyword is used to access a global variable from within a function.

a) Global

b) Local

c) General

d) expand

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

13) In php define () key word is used to declare the a constant .The constant value
cannot be changed during the script.

a) constant

b) const

c) static

d) define

Answer: d

14)PHP is compatible with almost all servers used today (Apache, IIS, etc.)

a) True

b) False

c) both true and false

d) non of these

Answer: a

15) PHP supports a wide range of databases

a) True

b) False

c) both true and false

d) non of these

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

16) in php var key word is used to declare the array...

a) True

b) False

c) both true and false

d) non of these

Answer: b

17) in PHP ,A variable starts with the $ sign, followed by the name of the
variable

a) True

b) False

c) both true and false

d) non of these

Answer: a

18) == Is quality it is used to assign the value of right hand side to left hand side.

a) True

b) False

c) both true and false

d) non of these

Answer: b

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

19) in PHP , Variable names are case-sensitive ($age and $AGE are two
different

a) True

b) False

c) both true and false

d) non of these

Answer: a

20) An array is a special variable, which can hold more than one value at a time
with different data types.

a) True

b) False

c) both true and false

d) non of these

Answer: b

21) __________ is Web development software . Create, code and manage dynamic
websites easily with a smart, simplified coding engine

a) HTTP

b) Bandwidth

c) webpage

d) Dream viewer

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

22) ________ is a server scripting language, and a powerful tool for making dynamic
and interactive Web pages.
a) PHP
b) java script
c) Angular js
d) none of these

Answer: a

23) _______ is a object oriented programming language , it is used to create the


object…
a) PHP
b) java script
c) Angular js
d) none of these

Answer: a

24) A ________ script can be placed anywhere in the document.


a) PHP
b) java script c
c) Angular js
d) none of these

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

25) The default file extension for PHP files is _________


a) .PHP
b) .js
c) .Ajs
d) none of these

Answer: a

26) __________ is used to show the out put …or give message..same as printf in c
language…

a) Echo
b) java script
c) Angular js
d) none of these

Answer: a

27) A PHP script starts with <?php and ends with ?>:
<?php
// PHP code goes here
?>
a) true
b) false
c) both a and b
d) none of these

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

28) PHP code is executed on the server, and the result is returned to the browser as
plain html
a) true
b) false
c) both a and b
d) none of these

Answer: a

29) PHP files can contain text, HTML, CSS, JavaScript, and PHP code
a) true
b) false
c) both a and b
d) none of these

Answer: a

30) PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

31) PHP is compatible with almost all servers used today (Apache, IIS, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

32) PHP supports the following data types:

a)String

b) Integer

c) Float (floating point numbers - also called double)

d) all of the above .

Answer: d

33) PHP divides the operators in the following groups:

a)Increment/Decrement operators

b)Logical operators

c)String operators

d) all of the above

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

34) The basic assignment operator in PHP is __________ It means that the left operand
gets set to the value of the assignment expression on the right.

a) =

b) ++

c) ==

d) ?

Answer: a

35) the _________ statement is used to perform different actions based on different
conditions

a) switch

b) if condition

c) foreach

d) while

Answer: b

36) In PHP, we have the following loop types:

a) while loop

b) for loop

c) foreach

d) all the these.

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

37) the _________ statement is used to check the action on each step and perform
different actions based on different conditions

a) if else condition

b) if condition

c) else if ladder

d) while

Answer: c

38) In PHP, ______in this loop we check show true statement first then check the
condition :

a) while loop

b) for loop

c) do while

d) all the these.

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

39)Use the ____ statement to select one of many blocks of code to be


executed.

a) if else condition

b) if condition

c) switch

d) while

Answer: c

40)_____ are used to execute the same block of code again and again, as `long
as a certain condition is true.

a) if else condition

b) if condition

c) loop

d) while

Answer: c

41) ______ loops through a block of code as long as the specified


condition is true

a) if else condition

b) if condition

c) loop

d) while

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

42) _____ loops through a block of code once, and then repeats the loop as
long as the specified condition is true

a) if else condition

b) if condition

c) loop

d) do while

Answer: d

43)_____ loops through a block of code a specified number of times

a) if else condition

b) if condition

c) loop

d) for

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

44)______ loops through a block of code for each element in an

array

a) if else condition

b) if condition

c) loop

d) for each

Answer: d

45)The _____ will always execute the block of code once, it will then check
the condition, and repeat the loop while the specified condition is true.

a) if else condition

b) if condition

c) do while loop

d) for each

Answer: c

46)The works only on arrays, and is used to loop through each key/value
pair in an array.

a) if else condition

b) if condition

c) foreach loop

d) for each

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

47) PHP files can contain text, HTML, CSS, JavaScript, and PHP code
a) true
b) false
c) both a and b
d) none of these

Answer: a

48) PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

49) PHP is compatible with almost all servers used today (Apache, IIS, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

50) PHP supports the following data types:

a)String

b) Integer

c) Float (floating point numbers - also called double)

d) all of the above .

Answer: d

========================================================

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Unit 3 : Function in PHP

1) _________means the way to move from one page to another page in website.
To move from one page to another pages hyperlinks are used.

a) HTTP

b) Bandwidth

c) Navigation

d) Dream viewer

Answer: c

2) __________ is Web development software . Create, code and manage dynamic


websites easily with a smart, simplified coding engine

a) HTTP

b) Bandwidth

c) webpage

d) Dream viewer

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

3) ________ is a server scripting language, and a powerful tool for making dynamic
and interactive Web pages.
a) PHP
b) java script
c) Angular js
d) none of these
Answer: a

4) _______ is a object oriented programming language , it is used to create the


object…
a) PHP
b) java script
c) Angular js
d) none of these

Answer: a

5) A ________ script can be placed anywhere in the document.


a) PHP
b) java script c
c) Angular js
d) none of these
Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

6) The default file extension for PHP files is _________


a) .PHP
b) .js
c) .Ajs
d) none of these
Answer: a

7) __________ is used to show the out put …or give message..same as printf in c
language…

a) Echo
b) java script
c) Angular js
d) none of these
Answer: a

8) A PHP script starts with <?php and ends with ?>:


<?php
// PHP code goes here
?>
a) true
b) false
c) both a and b
d) none of these

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

9) PHP code is executed on the server, and the result is returned to the browser as
plain html
a) true
b) false
c) both a and b
d) none of these
Answer: a

10) PHP files can contain text, HTML, CSS, JavaScript, and PHP code
a) true
b) false
c) both a and b
d) none of these
Answer: a

11) PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
a) true
b) false
c) both a and b
d) none of these
Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

12) PHP is compatible with almost all servers used today (Apache, IIS, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

13) PHP supports a ___________ range of databases


a) wide
b) small
c) short
d) none of these
Answer: a

14) PHP supports the following data types:

a)String

b) Integer

c) Float (floating point numbers - also called double)

d) all of the above .

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

15) In PHP, an object must be_________declared.

a) explicitly

b) implicitly

c) both a and b

d) None of these

Answer: d

16) PHP divides the operators in the following groups:

a)Increment/Decrement operators

b)Logical operators

c)String operators

d) all of the above

Answer: d

17) The basic assignment operator in PHP is __________ It means that the left operand
gets set to the value of the assignment expression on the right.

a) =

b) ++

c) ==

d) ?

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: a

18) the _________ statement is used to perform different actions based on different
conditions

a) switch

b) if condition

c) foreach

d) while

Answer: d

19) In PHP, we have the following loop types:

a) while loop

b) for loop

c) foreach

d) all the these.

Answer: a

20) the _________ statement is used to check the action on each step and perform
different actions based on different conditions

a) if else condition

b) if condition

c) else if ladder

d) while

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: c

21) In PHP, ______in this loop we check show true statement first then check the
condition :

a) while loop

b) for loop

c) do while

d) all the these.

Answer: c

22) PHP code is executed on the server, and the result is returned to the browser as
plain html
a) true
b) false
c) both a and b
d) none of these
Answer: a

23) PHP files can contain text, HTML, CSS, JavaScript, and PHP code
a) true
b) false
c) both a and b

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

d) none of these
Answer: a

24) PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
a) true
b) false
c) both a and b
d) none of these
Answer: a

25) PHP is compatible with almost all servers used today (Apache, IIS, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

26) PHP supports a ___________ range of databases


a) wide
b) small
c) short
d) none of these
Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

27) PHP supports the following data types:

a)String

b) Integer

c) Float (floating point numbers - also called double)

d) all of the above .

Answer: d

28) In PHP, an object must be_________declared.

a) explicitly

b) implicitly

c) both a and b

d) None of these

Answer: d

29) PHP divides the operators in the following groups:

a)Increment/Decrement operators

b)Logical operators

c)String operators

d) all of the above

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

30) The basic assignment operator in PHP is __________ It means that the left operand
gets set to the value of the assignment expression on the right.

a) =

b) ++

c) ==

d) ?

Answer: a

31) the _________ statement is used to perform different actions based on different
conditions

a) switch

b) if condition

c) foreach

d) while

Answer: d

32) In PHP, we have the following loop types:

a) while loop

b) for loop

c) foreach

d) all the these.

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: a

33) the _________ statement is used to check the action on each step and perform
different actions based on different conditions

a) if else condition

b) if condition

c) else if ladder

d) while

Answer: c

34) The basic assignment operator in PHP is __________ It means that the left operand
gets set to the value of the assignment expression on the right.

a) =

b) ++

c) ==

d) ?

Answer: a

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

35) the _________ statement is used to perform different actions based on different
conditions

a) switch

b) if condition

c) foreach

d) while

Answer: b

36) In PHP, we have the following loop types:

a) while loop

b) for loop

c) foreach

d) all the these.

Answer: d

37) the _________ statement is used to check the action on each step and perform
different actions based on different conditions

a) if else condition

b) if condition

c) else if ladder

d) while

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: c

38) In PHP, ______in this loop we check show true statement first then check the
condition :

a) while loop

b) for loop

c) do while

d) all the these.

Answer: c

39)Use the ____ statement to select one of many blocks of code to be


executed.

a) if else condition

b) if condition

c) switch

d) while

Answer: c

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

40)_____ are used to execute the same block of code again and again, as `long
as a certain condition is true.

a) if else condition

b) if condition

c) loop

d) while

Answer: c

41) ______ loops through a block of code as long as the specified


condition is true

a) if else condition

b) if condition

c) loop

d) while

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

42) _____ loops through a block of code once, and then repeats the loop as
long as the specified condition is true

a) if else condition

b) if condition

c) loop

d) do while

Answer: d

43)_____ loops through a block of code a specified number of times

a) if else condition

b) if condition

c) loop

d) for

Answer: d

44)______ loops through a block of code for each element in an

array

a) if else condition

b) if condition

c) loop

d) for each

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: d

45)The _____ will always execute the block of code once, it will then check
the condition, and repeat the loop while the specified condition is true.

a) if else condition

b) if condition

c) do while loop

d) for each

Answer: c

46)The works only on arrays, and is used to loop through each key/value
pair in an array.

a) if else condition

b) if condition

c) foreach loop

d) for each

Answer: c

47) PHP files can contain text, HTML, CSS, JavaScript, and PHP code
a) true
b) false
c) both a and b
d) none of these

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

Answer: a

48) PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

49) PHP is compatible with almost all servers used today (Apache, IIS, etc.)
a) true
b) false
c) both a and b
d) none of these

Answer: a

50) PHP supports the following data types:

a)String

b) Integer

c) Float (floating point numbers - also called double)

d) all of the above .

Answer: d

Prof . Yogesh .P. Deshmukh www.dacc.edu.in


DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45

Class :- SYBBA(CA )(III Semester) (2019 Pattern) Sub:- PHP

------------------------------------------------------------------------------------------------

Prof . Yogesh .P. Deshmukh www.dacc.edu.in

You might also like