105
76.1k
Chapter:

140+ more mcqs Solved MCQs

in Web Technology

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Bachelor of Computer Applications (BCA) , Bachelor of Business Administration in Computer Applications (BBA [CA]) .

Chapters

More MCQs
101.

The snippet that has to be used to check if “a” is not equal to “null” is

A. if(a!=null)
B. if (!a)
C. if(a!null)
D. if(a!==null)
Answer» D. if(a!==null)
102.

Among the following, which one is a ternary operator?

A. +
B. :
C.
D. ?:
Answer» D. ?:
103.

Consider the following statements var text = "testing: 1, 2, 3"; // Sample text var pattern = /\d+/g In order to check if the pattern matches with the string “text”, the statement is

A. text==pattern
B. pattern.test(text)
C. text.test(pattern)
D. text.equals(pattern)
Answer» B. pattern.test(text)
104.

A function definition expression can be called

A. Function prototype
B. Function literal
C. Function definition
D. Function declaration
Answer» B. Function literal
105.

JavaScript is a _______________ language

A. Object-Oriented
B. High-level
C. Assembly-language
D. Object-Based
Answer» D. Object-Based
106.

A conditional expression is also called a

A. Alternate to if-else
B. Immediate if
C. If-then-else statement
D. None of the above
Answer» B. Immediate if
107.

The “var” and “function” are

A. Keywords
B. Declaration statements
C. Datatypes
D. Prototypes
Answer» B. Declaration statements
108.

The method or operator used to identify the array is

A. isarrayType()
B. ==
C. ===
D. typeof
Answer» D. typeof
109.

What will happen if reverse() and join() methods are used simultaneously ?

A. Reverses and stores in the same array
B. Reverses and concatenates the elements of the array
C. Reverses
D. All of the above
Answer» A. Reverses and stores in the same array
110.

The pop() method of the array does which of the following task ?

A. decrements the total length by 1
B. increments the total length by 1
C. prints the first element but no effect on the length
D. None of the above
Answer» A. decrements the total length by 1
111.

The ‘$’ present in the RegExp object is called a

A. character
B. matcher
C. metacharacter
D. metadata
Answer» C. metacharacter
112.

The regular expression to match any one character not between the brackets is

A. [...]
B. [^]
C. [^...]
D. [\D]
Answer» C. [^...]
113.

The type that specifies what kind of event occured is

A. event type
B. even target
C. Both a and b
D. None of the above
Answer» A. event type
114.

Which is the object on which the event occured or with which the event is associated?

A. event type
B. event target
C. Both a and b
D. None of the above
Answer» B. event target
115.

In general, event handler is nothing but

A. function
B. interface
C. event
D. handler
Answer» A. function
116.

When will the browser invoke the handler?

A. Program begins
B. Any event occurs
C. Specified event occurs
D. None of the above
Answer» C. Specified event occurs
117.

Which are the events that have default actions that can be canceled by event handlers?

A. Submit and form-related events
B. Reset and form-related events
C. Submit and reset events
D. None of the mentioned
Answer» C. Submit and reset events
118.

The events that represents occurrences related to the browser window are

A. Window
B. Element
C. Display
D. Handlers
Answer» A. Window
119.

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
Answer» B. Load
120.

Which is the opposite to the load event in JavaScript?

A. dontload
B. postload
C. preload
D. unload
Answer» D. unload
121.

When are the mouse events generated?

A. When user clicks the mouse over a document
B. When user moves the mouse over a document
C. Both a and b
D. None of the above
Answer» C. Both a and b
122.

When is the mouseover event fired?

A. When mouse is moved over a new element
B. When mouse is clicked
C. When mouse is both moved and clicked
D. None of the above
Answer» A. When mouse is moved over a new element
123.

The focus and blur events are also part of

A. Element events
B. Handler events
C. Window events
D. Scroll events
Answer» C. Window events
124.

Which syntax is used to describe elements in CSS?

A. Protectors
B. Selectors
C. Both a and b
D. None of the above
Answer» B. Selectors
125.

The C in CSS stands for

A. Continuous
B. Cascaded
C. Contentional
D. Cascading
Answer» D. Cascading
126.

When are the keyboard events fired?

A. When user manually calls the button
B. When user clicks a key
C. When the user calls the modifier
D. All of the above
Answer» A. When user manually calls the button
127.

What PHP stands for?

A. Hypertext Preprocessor
B. Pre Hypertext Processor
C. Pre Hyper Processor
D. Pre Hypertext Process
Answer» A. Hypertext Preprocessor
128.

Which of the following tags is not a valid way to begin and end a PHP code block?

A. <% %>
B. <? ?>
C. <! !>
D. <? php ?>
Answer» D. <? php ?>
129.

Variables always start with a ........ in PHP

A. Pond-sign
B. Yen-sign
C. Dollar-sign
D. Euro-sign
Answer» C. Dollar-sign
130.

What function computes the difference of arrays?

A. array_diff
B. diff_array
C. arrays_diff
D. diff_arrays
Answer» A. array_diff
131.

What functions count elements in an array?

A. Count
B. Size
C. Array_Count
D. Count_array
Answer» A. Count
132.

There are three different kind of arrays:

A. Numeric array, String array, Multidimensional array
B. Numeric array, Associative array, Dimensional array
C. Numeric array, Associative array, Multidimensional array
D. Const array, Associative array, Multidimensional array
Answer» C. Numeric array, Associative array, Multidimensional array
133.

Which array function checks if the specified key exists in the array

A. array_key_exist()
B. array_key_exists()
C. array_keys_exists()
D. arrays_key_exists()
Answer» B. array_key_exists()
134.

Which of the following DBMSs do not have a native PHP extension?

A. MySQL
B. IBM DB/2
C. Microsoft SQL Server
D. None of the above
Answer» D. None of the above
135.

In PHP in order to access MySQL database you will use:

A. mysqlconnect() function
B. mysql-connect() function
C. mysql_connect() function
D. sql_connect() function
Answer» C. mysql_connect() function
136.

PHP files have a default file extension of..

A. .html
B. .xml
C. .php
D. .ph
Answer» C. .php
137.

Which of the following is/are a PHP code editor? i) Notepad ii) Notepad++ iii) Adobe Dreamweaver iv) PDT

A. Only iv)
B. Only iii)
C. i), ii) and iii)
D. All of the above
Answer» B. Only iii)
138.

Which version of PHP introduced Try/catch Exception?

A. PHP 4
B. PHP 5
C. PHP 5.3
D. PHP 6
Answer» B. PHP 5
139.

We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */

A. Only ii)
B. i), iii) and iv)
C. ii), iii) and iv)
D. Both ii) and iv)
Answer» C. ii), iii) and iv)
140.

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. $add = $add +$add
141.

Which of the below symbols is a newline character?

A. \r
B. \n
C. /n
D. /r
Answer» B. \n
142.

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. All of the above
Answer» D. All of the above
143.

Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop

A. i) and ii)
B. i), ii) and iii)
C. All of the above
D. None of the above
Answer» C. All of the above
144.

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

A. 12
B. 1
C. Error
D. 5
Answer» D. 5
145.

Who is the father of PHP?

A. Rasmus Lerdorf
B. Willam Makepiece
C. Drek Kolkevi
D. List Barely
Answer» A. Rasmus Lerdorf
146.

What will be the output of the following php code? <?php $num = "1"; $num1 = "2"; print $num+$num1; ?>

A. 3
B. 1+2
C. Error
D. 12
Answer» A. 3
147.

Which of following variables can be assigned a value to it? i) $3hello ii) $_hello iii) $this iv) $This

A. All of the above
B. Only ii)
C. ii), iii) and iv)
D. ii) and iv)
Answer» D. ii) and iv)
148.

What will be the output of the following PHP code? <?php $a = "clue"; $a .= "get"; echo "$a"; ?>

A. get
B. true
C. false
D. clueget
Answer» D. clueget

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.