0% found this document useful (0 votes)
83 views

MCQS WP QB STDCP

Questions will help you

Uploaded by

tahiraansari882
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)
83 views

MCQS WP QB STDCP

Questions will help you

Uploaded by

tahiraansari882
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/ 36

Web Programming

UNIT – I & II

1. HTML stands for ___ .


(a) Hyper Text Markup Language
(b) Home Text Markup Language
(c) Hyper Text Main Language
(d) Hyper term Markup Language
2. An HTML file must contain __ file extension.
(a) .xml
(b) .js
(c) .css
(d) .html
3. HTML5 tag names are case ___ .
(a) Sensitive
(b) Insensitive
(c) Non of the above
(d) All of the above
4. ___ displays the contents in the italic forms.
(a) <b></b>
(b) <i></i>
(c) <p></p>
(d) <h></p>
5. <p>...</p> contains a ___.
(a) Paragraph
(b) Heading
(c) Bold
(d) All of the above
6. Which of the following tag is used for inserting the largest heading in HTML?
(a)<h3>
(b)<h5>
(c)<h1>
(d)<h6>
7. The correct sequence of HTML tags for starting a webpage is-
(a) Head, Title, HTML, body
(b) HTML, Body, Title, Head
(c) HTML, Head, Title, Body
(d) HTML, body, head, title
8. How to create an unordered list (a list with the list items in bullets) in HTML?
(a)<ul>
(b)<ol>
(c)<li>
(d)<i>

9. Which character is used to represent the closing of a tag in HTML?

(a)!

(b) /

(c) \

(d).

10. How to create a hyperlink in HTM?

(a) <a href = "www.google.com"> google.com </a>

(b) <a url = "www.google.com" google.com /a>

(c) <a link = "www.google.com"> google.com </a>

(d) <a> www.google.com <google.com /a>

11. How to create an ordered list (a list with the list items in numbers) in HTML?

(a) <ul>

(b) <ol>

(c) <li>

(d) <li>

12. How to insert an image in HTML?

(a) <img href = "jtp.png" />

(b) <img url = "jtp.png" />

(c) <img link = "jtp.png" />

(d) <img src = "jtp.png" />

13. How to add a background color in HTML?


(a) <marquee bg color: "red">

(b)<marquee bg-color = "red">

(c)<marquee bgcolor = "red">

(d)<marquee color = "red">

14) Which of the following tag is used to make the underlined text?

(a) <i>

(b)<ul>

(c) <u>

(d) <pre>

15) How to create a checkbox in HTML?

(a) <input type = "checkbox">

(b) <input type = "button">

(c) <checkbox>

(d) <input type = "check">

16) Which of the following tag is used to define options in a drop-down selection list?

(a)<select>

(b) <list>

(c) <dropdown>

(d) <option>

17) HTML tags are enclosed in-

(a) #and#

(b) {and}

(c) ! and ?

(d) <and>
18) Which of the following tag is used to add rows in the table?

(a) <td> and </td>

(b) <th> and </th>

(c) <tr> and </tr>

(d ) None of the above

19) The <hr> tag in HTML is used for –

(a) new line

(b) vertical ruler

(c) new paragraph

(d) horizontal ruler

20) Which of the following attribute is used to provide a unique name to an element?

(a) class

(b) id

(c) type

(d) None of the above

21) Which of the following HTML tag is the special formatting tag?

(a) <p>

(b) <b>

(c) <pre>

(d) None of the above

22) Which of the following is the correct way to send mail in HTML?

(a) <a href = "mailto: xy@y">

(b) <a href = "xy@y">

(c) <mail xy@y</mail>


(d) None of the above

23) Which of the following is the container for <tr>, <th>, and <td> ?

(a) <data>

(b) <table>

(c) <group>

(d) All of the above

24) How to insert a background image in HTML?

(a) <body background = "img.png">

(b) <img background = "img.png">

(c) <bg-image = "img.png">

(d) None of the above

25) What are the types of unordered or bulleted list in HTML?

(a) disc, square, triangle

(b) polygon, triangle, circle

(c) disc, circle, square

(d) All of the above

26. CSS stands for ___.

(a) cascading style sheet

(b) cascading single sheet

(b) cascading single style

(d) non of the above

27. If we want define style for an unique element, then which css selector will we use ?
(a) Id
(b) class
(c) text
(d) name
28. Which of the following property is used to set the background image of an element?
(a) -background-color
(b) -background-image
(c) –background-repeat

(d) –background-position

29. Which of the following property changes the color of bottom border?

(a) border-color

(b) border-style

(c) border-width

(d) border-bottom-color

30. When we write <img src="img.png">, what "img.png" inside double quote implies?
(a) element
(b) attribute
(c) value
(d) operator
31. How can we write comment along with CSS code ?
(a) /* a comment*/
(b) //a comment //
(c) / a comment/
(d) <’a comment’>

32. How can we write comment along with HTML code?

(a) #comment

(b)<!—comment -->

(c)//comment

(d)/*comment*/

34. Which CSS property is used to control the text size of an element ?
(a) font-style

(b) text-size

(c) font-size

(d) text-style

35. The default value of "position" attribute is _________.


(a) fixed
(b) absolute

(c) inherit

(d) relative

36. How will you make all paragraph elements 'RED' in color ?
(a) p.all{color:red;}
(b) p.all{color:#990000;}
(c) all.p{color:#998877;}
(d) p{color:red;}
37. By default Hyperlinks are displayed with an underline. How do you remove the underline
from all hyperlinks by using CSS code ?
(a) a {text: no-underline;}

(b) a {text-decoration:none;}

(c) a {text-style: no-underline;}

(d) a {text-decoration: no-underline;}

38. _________ selectors, which are used to specify a group of elements

(a) id

(b) class

(c) tag

(d) both (a) and (c)

39. Which of the following is not a value for font-style property?


(a) normal

(b) italic

(c) oblique

(d) bold

40. What will happen in this case?


h1 {color: “green”;}

(a) heading becomes green

(b) heading becomes dark-green

(c) error occurs

(d) nothings happen

41. Which of the following is the correct way to apply Styles?

(a) inside an HTML element

(b) inside the section of an HTML page

(c) in an external CSS file

(d) all of the mentioned

42. Which of the following is the correct way to create a list using the lowercase letters?

(a) <ol alpha = "a" >

(b) <ol type = "a">

(c) <ol letter = "a">

(d) <ol style = "a">

43. Which of the following HTML attribute is used to define inline styles?

(a) style

(b) type

(c) class
(d) id

44. A program in HTML can be rendered and read by –

(a) web browser

(b) server

(c) interpreter

(d) compiler

45. Which of the following is the root tag of the HTML document?

(a) <body>

(b) <html>

(c) <head>

(d) <title>

46. Which of the following is the correct way to change the font face in HTML?

(a) <font name = "Calibri"> ……… </font>

(b) <font face = "Calibri"> ……… </font>

(c) <font = "Calibri"> ……… </font>

(d) <font style = "Calibri"> ……… </font>

47. Which of the following HTML tag is used to display the text with scrolling effect?

(a) <marquee>

(b) <scroll>

(c) <div>

(d) <pre>

48. Which of the following is the correct way to start an ordered list with the count of numeric
value 4?

(a) <ol type = "1" initial = "4">


(b) <ol type = "1" begin = "4">

(c) <ol type = "1" num = "4">

(d) <ol type = "1" start = "4">

49. DNS stands for

a. Data Name Service

b. Domain Name Server

c. Domain Nation Server

d. Domain Notation Service

50. Which one is not a Semantic Tag

a. <header>

b. <title>

c. <aside>

d. <footer>

51. ___________ formatting makes text smaller and raises it off the baseline.

a. Upper

b. Superscript

c. Subscript

d. Bold

52. To start a numbered list at a number other than 1, we can use ______ the attribute

with the tag

a. first

b. begin

c. start

d. list

53. _____ tag is used to print horizontal line


a. <line>

b. <hr line>

c. <hr>

d. <li>

54. In how many ways we can apply value to color attribute

a. 1

b. 2

c. 3

d. 4

55 To direct the hyperlink to open a page in a new window we add______ attribute in <a> tag

a. alt=”new_window”

b. target=”_blank”

c. href=”new”

d. open=”new”

56. A ______ can be applied to multiple selections, where as an ___ uniquely identifies a
specific

selection within a document.

a. ID, Class

b. name, ID

c. Class, ID

d. Class, name

57. Font size is typically measured in ________ for onscreen display

a. number(no)

b. pixels(px)

c. height

d. width
58. This adds a specified amount of space between the border of an element and its contents

(inside of the element)

a. Border

b. Margin

c. Padding

d. Space

59. What is the correct syntax of doctype in HTML5?


a) <!doctype html>
b) <doctype html!>
c) <doctype html>
d) </doctype html>

60. Which element was not removed by HTML5?


a) <strike>
b) <center>
c) <small>
d) <big>

61. Which of the following is not sectioning elements?


a) <article>
b) <aside>
c) <nav>
d) <header>

62. HTML5 documents may contains a ___________ element, which is used to set the header
section of a document.
a) header
b) footer
c) section
d) drive

63 _____________ is a system in which objects like text, pictures, music or programs can be

creatively linked to each other.

a. onerror

b. strike

c. hypertext
d. body

64. URL stands for

a. Uniform Resource Locator

b. Universal Resource Locator

c. Uniform Resource Location

d. Uniform Resource Locality

65. ____ tag is used to merge columns in tables in HTML.

a. <tr>

b. <td>

c. colspan

d. rowspan

66. _________ gives an outline definition to the table

a. Font-family

b. Cellpadding

c. Cellspacing

d. Border

67. ___________ defines a one line input field for text input.

a. <form>

b. <option>

c. <label>

d. <input>

68. A dropdown list can be created using a ________ tag.

a. <select>

b. <button>

c. <option>

d. <label>
69. Which property of the input tag allows us to specify the range of values?

a. deltime

b. color

c. range

d. deldate

70.We can add images, videos, audio and html files by

a. <embed>

b. <MAP>

c. <IMGMAP>

d. <label>

71. HTML gives a functionality to collect data from users with the help of __________.

a. hyperlink

b. forms

c. tables

d. div

72. The __________ option is used to merge rows in table.

a. th

b. align

c. valign

d. rowspan

73. Which of the following is not a valid tag in html?

a. <h1>

b. <h3>

c. <h6>

d. <h8>

74. In the Area tag which is NOT the value of shape attribute?
a. CIRCLE

b. TRIANGLE

c. RECT

d. PLOY

75. Which of the values are not valid with align attribute.

a. left

b. centre

c. down

d. justify

76. Which of the following is a new input attribute introduce by HTML5?


a) text
b) checkbox controls
c) submit buttons
d) date

77. What is the default type of ‘type’ attribute of <input> element?


a) Text
b) Password
c) Numerals
d) Special Characters

78. Which attribute is used for activation of JavaScript?


a) button
b) checkbox
c) url
d) submit

79. Which element is used to create multi-line text input?


a) text
b) textarea
c) submit
d) radio button

80. Which attribute is not used for the radio type?


a) name
b) value
c) checked
d) selected

81. Which of the following is not set with font-style property?


a) font-style: normal
b) font-style: italic
c) font-style: oblique
d) font-style: capitalize

82. ------------------is an application layer protocol used on the internet or LAN to provide
bidirectional interactive text oriented communication facilities using a virtual terminal
connection.

a. ARPANET

b. Telnet

c. Internet

d. Intranet

83. Which protocol is the standard protocol used to transfer computer files between client and
server on a computer network?

a. HTTP

b. TCP

c.FTP

d. IP

85. Treading of merchandise , over the internet is known as ----------

a. E-Business

b. E-Commerce

c. E-Banking

d. E-Governance

86. -------------------provides the services for accessing and using the Internet

a. ISP

b. DSL

c. FTP
d. DNS

87. Which of the following is the open source Java servlet Container that function as web server?

a. IIS

b. Proxy Server

c. Apache Tomcat

d. Hot Java

88. Which of the following attribute of <a> tag specifies where to open the linked document?

a. href

b. target

c. style

d. vlink

89. In which blockof HTML page, an Internal CSS is defined ?

a. <body>

b.<Form>

c. <head>

d.<Title>

90. Which tag is added to use an external style sheet in HTML Page?

a. <style>

b. <Css>

c. <Href>

d. <link>

91. Which CSS property defines the font to be used?

a. font-family

b.font-type

c.font-style

d.font-size
92. Which HTML tag is used to add navigation bar on the Web page?

a. <section>

b. <aside>

c.<option>

d.<nav>

93. An image map is a clickable image on the web page that contains -------

a. area

b. hotspots

c. links

d. coordinates

94. Which attribute is useful to start the video automatically ?

a. controls

b. track

c. autoplay

d. play

95. Which type of button submits the form data to the form-handler?

a. Radio button

b.Push button

c. Submit

d. Reset

UNIT – III

(1) Which type of JavaScript language is ___.


(a) Object – oriented
(b) Object – based
(c) Assembly-language
(d) High-level
(2) Which of the following is the correct output for the following JavaScript code:
Var x=5,y=1
var obj ={ x:10}
with(obj)
{
alert(y)
}
(a) 1
(b) Error
(c) 10
(d) 5

(3) In JavaScript, what is a block of statement?


(a) Conditional block
(b) Block that combines a number of statements into a single compound statement
(c) Both condition block and a single statement
(d) Block that contains a single statement

(4) The "function" and " var" are known as:


(a) Keywords
(b) Data types
(c) Declaration statements
(d) Prototypes

(5) Which of the following is the correct output for the following JavaScript code:
var x=8;
if(x>9)
{
document.write(9);
}
else
{
document.write(x);
}
(a) 9
(b) 0
(c) 8
(d) Undefined

(6) Which of the following is the correct output for the following JavaScript code:
var grade='C';
var result;
switch(grade)
{
case'A':
{
result+="10";
break;
}
case'B':
{
result+=" 9";
break;
}
case'C':
{
result+=" 8";
break;
}
default:
result+=" 0";
}
document.write(result);

(a) 10
(b) 9
(c) 8
(d) 0

(7) Which of the following is the correct output for the following JavaScript code:
var x=3;
var y=2;
var z=0;
If(x==y)
document.write(x);
elseif(x==y)
document.write(x);
else
document.write(z);
(a) 3
(b) 0
(c) Error
(d) 2

(8) Which of the following number object function returns the value of the number?
(a) toString()
(b) valueOf()
(c) toLocaleString()
(d) toPrecision()

(9) Which of the following function of the String object returns the character in the string
starting at the specified position via the specified number of characters?
(a) Slice()
(b) Split()
(c) Substr()
(d) Search()

(10) Choose the correct snippet from the following to check if the variable "a" is not equal
the "NULL":
(a) If(a!==null)
(b) If(a!)
(c) If(a!null)
(d) If(a!=null)

(11) See the given code of JavaScript and choose the correct output from the following:
Function comparing()
{
Int x=9;
Char y=9;
if(x==y)
return true;
else
return false;
}

(a) Compilation error


(b) False
(c) Runtime error
(d) True

(12) In JavaScript, what will be used for calling the function definition expression:
(a) Function prototype
(b) Function literal
(c) Function calling
(d) Function declaration

(13) Which one of the following is an ternary operator:


(a) ? :
(b) :
(c) –
(d) +
(14) Which one of the following symbol is used for creating comments in the javascript:
(a) \\
(b) //
(c) \* *\
(d) \* */
(15) A collection of elements of the same data type which may either in order or not, is
called _____.
(a) String
(b) Array
(c) Serialized object
(d) Object

(16) Which one of the following given task is performed by the "pop()" method of the
array?
(a) It updates the element of the array
(b) It increment the total length of the array by 1
(c) It prints the first element and made no impact on the length of the array
(d) updates the element removes one element of an array on each time the "pop()"
function called

(17) Which one of the following keywords is used for defining the function in the
JavaScript?
(a) Void
(b) Init
(c) Main
(d) Function

(18) ___________ Operator returns the remainder after division.

a. /
b. %
c. ++
d. ||
19. The ________ operator checks if the value of two operands are equal or not.
a. ==
b. =
c. ||
d. &&
20. The _______ operator reverses the logical state of its operand.
a. &&
b. ||
c. !
d. ++
21. _______ means that either operand one is true or operand two is true but not both.
a. Bitwise AND
b. Bitwise OR
c. Bitwise NOT
d. Bitwise XOR
22. The _________ operator evaluates the data type of the operand.
a. typeof
b. conditional
c. bitwise
d. arithmetic
23. The ______ keyword is seen as an instance of current object in the class method.
a. comma
b. conditional
c. this
d. delete
24. The __________ keyword specifies an expression to be evaluated without returning a
value
a. delete
b. var
c. void
d. export
25. _________ variables are destroyed when you exit the function.
a. local
b. private
c. global
d. external
26. __________ variables are destroyed when you close the page.
a. local
b. private
c. global
d. external
27. The _________ statement will break the loop & continue executing the code that
follows after the loop.
a. continue
b. if...else
c. switch
d. break
28. ________ combines the text of two strings & returns a new string.
a. match()
b. charAt()
c. indexof()
d. concat()
29. ________extracts a section of a string & returns a new string.
a. replace()
b. search()
c. slice()
d. split()
30. __________ returns a number between 0 & 1.
a. round()
b. random()
c. max()
d. min()
31. The function definitions in JavaScript begins with _____________
a) Identifier and Parentheses
b) Return type and Identifier
c) Return type, Function keyword, Identifier and Parentheses
d) Identifier and Return type
32. What is the purpose of a return statement in a function?
a) Returns the value and continues executing rest of the statements, if any
b) Returns the value and stops the program
c) Returns the value and stops executing the function
d) Stops executing the function and returns the value
33. When will the browser invoke the handler?
a) Program begins
b) Any event occurs
c) Specified event occurs
d) Webpage loads
34. Which event is fired when a document and all of its external resources are fully loaded
and displayed to the user?
a) Window
b) Load
c) Element
d) Handler
35. The focus and blur events are also part of _________
a) Element events
b) Handler events
c) Window events
d) Scroll events
36. Java script files have the file extension as -------
a. .htm
b. .script
c. .jsp
d. .js
37. Which attribute of the <script> tag is useful to add external script in the web page?
a. link
b. src
c. rel
d. href
38. Which of the following method can be use to accept the data ?
a. Window.alert()
b. document.write()
c. window.prompt()
d. document.read()
39. Which of the following array function searches the array for an element and returns its
position?
a. Find()
b. findIndex()
c. forEach()
d. indexOf()
40. Which of the following function returns the day of the month?
a. getDay()
b. getMonth()
c. getDate()
d. getUTCDay()
41. Which of the following math function returns the rounded value upwards to the nearest
integer?
a. round()
b. ceil()
c. floor()
d. int()
42. --------------event handler executes Java script when input focus leaves the field.
a. onBlur
b. onAbort
c. onFocus
d. onChange
43. --------------event handler executes Java script when input focus exits the field after user
modifies the text
a. onBlur
b. onAbort
c. onFocus
d. onChange
44. --------------event handler executes Java script when input focus enters the field either by
tabbing or by clicking.
a. onBlur
b. onAbort
c. onFocus
d. onChange
45. --------------event handler executes Java script when a window,document or images
finishes loading.
a. onAbort
b. onBlur
c. onLoad
d. onUnload
46. Which event handler is get notified when user selects the text from textarea?
a. onLoad
b. onSelect
c. onBlur
d. onChange
47. what is output of the following JavaScript
<script type=” text/ javascript”>
var x=5;
x %= 5;
document.write(“x=” + x);
</script>
a. X=1
b. X=0
c. X=5
d. X=25
48. What will be the output of the following script
<script type=”text/javascript”>
var j = 3;
var k = 10;
j=k++;
document.write(“j= “ + j);
</script>
a. j=13
b. j=14
c. j=10
d. j=11
49.

UNIT – IV

1. PHP stands for?

(a) PHP Hypertex Processor


(b) PHP Hyper Markup Processor
(c) PHP Hyper Markup Preprocessor
(d) PHP Hypertext Preprocessor

2. PHP is an example of ___ scripting language.

(a) Server-side
(b) Client-side
(c) Browser-side
(d) In-side

3. Who is known as the father of PHP?

(a) Rasmus Lerdorf


(b) Willam Makepiece
(c) Drek Kolkevi
(d) List Barely
4. Which of the following is false?

(a) PHP can be used to develop web applications.


(b) PHP makes a website dynamic
(c) PHP applications can not be compile
(d) PHP can not be embedded into html.

5. PHP script enclosed within___.

(a) <php> . . . </php>


(b) <?php . . . ?>
(c) ?php . . . ?php
(d) <p> . . . </p>

6. Which of the following variables is not a predefined variable?

(a) $get
(b) $ask
(c) $request
(d) $post

7. Which of the following function returns the number of characters in a string variable?

(a) count($variable)
(b) len($variable)
(c) strcount($variable)
(d) strlen($variable)

8. PHP files have a default file extension of_______.

(a) .html
(b) .xml
(c) .php
(d) .ph

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

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

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


<?php
$num =1;
$num1 = 2;
echo $num. “+”.$num1;
?>

(a) 3
(b) 1+2
(c) 1.+.2
(d) Error

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

(a) echo “\$x”;


(b) echo “$$x”;
(c) echo”/$x”;
(d) echo”$x;”;

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


<?php
$a=5;
$b=5;
echo($a==$b);
?>

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

13. Which of the below symbols is newline character?

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

14. PHP’s numerically indexed array begin with position ___.

(a) 1
(b) 2
(c) 0
(d) -1

15. Which of the following PHP function will return true if a variable is an array or false if it
is not an array?

(a) this_array()
(b) is_array()
(c) do_array()
(d) in_array()

16. Which Built-in method returns the character at the specified index?

(a) GetCharAt()
(b) CharAt()
(c) CharacterAt()
(d) indexAt()

17. <?php
$str1=”Welcome”;
$str2=”Have a nice Day”;
Echo $str1.” “.$str2;
?>
What is the output of above code.
a) $str1=”welcome”
b) $str2=”Have a nice day”
c) Welcome Have a nice Day
d) Have a nice day
18. Which is not a PHP operator?
a) Arithmetic Operator
b) Assignment operator
c) Logical Operator
b) Boolean Operator
19. Which is the not type of Array in php?

a) Number Array

b) Associative array

c) Multidimensional array

d) Numeric Array

20. Which variables are used to retrieve information from forms, like user input.
a) $_GET and $_POST
b) $_SESSION
c) $_REQUEST
d)$_COOKIE
21. For PHP error handling used ……..function.
a) Echo()
b)Get()
c)die()
d) array()
22. . …………….. Are used to storing values, like text strings, numbers or arrays.
a) Variables

b) Functions

c) Array

d) Loops

23. --------------is an associative array which accepts parameters as key=> value pairs from
submission of HTML
a. $_GET
b. $_POST
c. $_REQUEST
d. $_SESSION
24. --------------is an associative array which accepts parameters from URL as a Query
string.
a. $_GET
b. $_POST
c. $_REQUEST
d. $_SESSION
25. In PHP single line comment is given using ----------

a. #
b. $
c. /
d. \\

26. Which looping statement is useful for processing each element in an array in PHP?

a. do-----while
b. while
c. forin
d. foreach

27. Which of the following statements terminates the execution of a loop prematurely?

a. continue
b. break
c. exit
d. quit

28. Which of the following statements is used to halt the current iteration of a loop ?

a. continue
b. break
c. exit
d. quit

29. --------------array stores element values in association with key values rather than the
index order.

a. Numeric array
b. Multidimensional array
c. Associative array
d. String array

30. In PHP ,Which of the followings is the correct statement ,for creating an array a

a. int a[];
b. $a=int a[10];
c. $a=array(10);
d. $a=array[10];

31. In PHP, Which of the followings is the correct statement ,for creating the associative
array marks

a. $marks=array(“Eng”=>38,”phy”=>40,”maths”=>78);
b. $marks=array[“Eng”=>38,”phy”=>40,”maths”=>78];
c. Ass marks=array(“Eng”-->38,”phy”-->40,”maths”-->78);
d. Int $marks=array(“Eng”=>38,”phy”=>40,”maths”=>78);

32. In PHP, to concatenate the two string variables ------------operator is used

a. +
b. .
c. >>
d. ++

33. Which method will be useful when password or other sensitive information to be sent to
the sever?

a. GET
b. POST
c. REQUEST
d. FILE

34. GET method is restricted to send only ----------------characters.

a. 255
b. 1024
c. 1045
d. 25

35. The -------------method can be used to send binary data .

a. REQUEST
b. POST
c. GET
d. FILE

36. In the exception handling, a function using exception is written in ----------- block.

a. Die
b. Try
c. Catch
d. Throw

UNIT V

1 The _________ function is used to free the session variable.

a session_start()

b unset()

c isset()

d setcookie()

2 In Regular Expressions in PHP, S stands for

a Digits 0-9

b Anything not a digit

c Any alphanumeric character or an underscore(_)

d Any nonwhite space character

3 In PHP regular expressions, Anything not a digit is denoted by ____

a .

bW

cD

d d

4. MYSQLi extension was introduced with which version of PHP.


a. PHP 3.0

b. PHP 4

c. PHP 5 onwards

d. PHP 1.0

5 ____________ function is used to set a cookie.

a isset()

b setcookie()

c session_destroy()

d unset()

6 The ______ automatically increases the value of the field by 1 each time a new record is
added.

a Primary key

b INSERT

c UPDATE

d AUTO-INCREMENT

7 The ______ clause is used to extract only those records that fulfil specified criteria.

a Where

b NULL

c INSERT

d Updates

8. Which one of the following statements is used to create a table?


a) CREATE TABLE table_name (column_name column_type);
b) CREATE table_name (column_type column_name);
c) CREATE table_name (column_name column_type);
d) CREATE TABLE table_name (column_type column_name);

9. Which one of the following methods can be used to diagnose and display information about a
MySQL connection error?
a) connect_errno()
b) connect_error()
c) mysql_connect_errno()
d) mysql_connect_error()

10. Which one of the following methods is responsible for sending the query to the database?
a) query()
b) send_query()
c) sendquery()
d) mysql_query()

11. Which function opens the new connection to MYSQLl sever ?

a. mysql_connect()

b. mysql_connection()

c. mysql_change_connect()

d.mysql_commit()

12. Which function performs a query against the database?

a. mysql_dbQuery()

b.mysql_query()

c. mysql_real_query()

d. mysql_execute()

13. A session is stated with -------------- function

a. session_start()

b. session()

c. $Session()

d. $_SESSION()

14. A PHP session can be destroyed using ------------ function

a. session_end()

b.session_destroy()
c.session_stop()

d. session_rollback()

15. --------------- are the text files stored on client computer.

a. sessions

b. cookies

c. mails

d. urls

16. In PHP Cookies are accessed with ------------- variable

a. $_COOKIE

b. $_Cookie

c. $_GetCookie

d. $_POST

17. ----------------function can be used to check whether cookie is set .

a. checkCookie()

b. isset()

c. isCookie()

d.isCookieset()

18.------------- function directly allows to send mail through script

a. sendMail()

b.HTTP_Mail();

c. mail()

d. PHP_Mail()

You might also like