MCQS WP QB STDCP
MCQS WP QB STDCP
UNIT – I & II
(a)!
(b) /
(c) \
(d).
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>
14) Which of the following tag is used to make the underlined text?
(a) <i>
(b)<ul>
(c) <u>
(d) <pre>
(c) <checkbox>
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>
(a) #and#
(b) {and}
(c) ! and ?
(d) <and>
18) Which of the following tag is used to add rows in the table?
20) Which of the following attribute is used to provide a unique name to an element?
(a) class
(b) id
(c) type
21) Which of the following HTML tag is the special formatting tag?
(a) <p>
(b) <b>
(c) <pre>
22) Which of the following is the correct way to send mail in HTML?
23) Which of the following is the container for <tr>, <th>, and <td> ?
(a) <data>
(b) <table>
(c) <group>
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’>
(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
(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;}
(a) id
(b) class
(c) tag
(b) italic
(c) oblique
(d) bold
42. Which of the following is the correct way to create a list using the lowercase letters?
43. Which of the following HTML attribute is used to define inline styles?
(a) style
(b) type
(c) class
(d) id
(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?
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. <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
a. first
b. begin
c. start
d. list
b. <hr line>
c. <hr>
d. <li>
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
a. ID, Class
b. name, ID
c. Class, ID
d. Class, name
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
a. Border
b. Margin
c. Padding
d. Space
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
a. onerror
b. strike
c. hypertext
d. body
a. <tr>
b. <td>
c. colspan
d. rowspan
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>
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
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
a. th
b. align
c. valign
d. rowspan
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
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
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
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>
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
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
(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;
}
(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
(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
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
(a) Server-side
(b) Client-side
(c) Browser-side
(d) In-side
(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)
(a) .html
(b) .xml
(c) .php
(d) .ph
(a) PHP 4
(b) PHP 5
(c) PHP 6
(d) PHP 5 and later
(a) 3
(b) 1+2
(c) 1.+.2
(d) Error
(a) 5===5
(b) Error
(c) 1
(d) False
(a) \r
(b) \n
(c) /n
(d) /r
(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);
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
a. 255
b. 1024
c. 1045
d. 25
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
a session_start()
b unset()
c isset()
d setcookie()
a Digits 0-9
a .
bW
cD
d d
b. PHP 4
c. PHP 5 onwards
d. PHP 1.0
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
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()
a. mysql_connect()
b. mysql_connection()
c. mysql_change_connect()
d.mysql_commit()
a. mysql_dbQuery()
b.mysql_query()
c. mysql_real_query()
d. mysql_execute()
a. session_start()
b. session()
c. $Session()
d. $_SESSION()
a. session_end()
b.session_destroy()
c.session_stop()
d. session_rollback()
a. sessions
b. cookies
c. mails
d. urls
a. $_COOKIE
b. $_Cookie
c. $_GetCookie
d. $_POST
a. checkCookie()
b. isset()
c. isCookie()
d.isCookieset()
a. sendMail()
b.HTTP_Mail();
c. mail()
d. PHP_Mail()