Advance WT (MCQ)
Advance WT (MCQ)
a)Abstract
b)Protected
c)Final
d)Static
2) Which of the following statements are true is/are true about constructors in PHP?
(c) only i
(d) only ii
a. ) class name()
b) _construct()
c) function _construct()
d) function __construct()
a) PHP 4
b). PHP 5
d). PHP 6
5) Which one of the following functions is used to determine whether a class exists?
a). exist()
b.) exist_class()
c )class_exist()
d.exist()
a.) obj_type()
b) type()
c ) is_a()
d) is_obj()
7) Which one of the following keyword is used to inherit our subclass into a superclass?
a). extends
b). implements
c). inherit
d). include
8) In the PHP code given below, what is/are the properties?
< ?php
class Example
public $name;
function Sample()
?>
c) class Example
9) Which keyword is used to refer to properties or methods within the class itself?
a). private
b) public
c) protected
d). $this
10) Which keyword allows class members (methods and properties) to be used without
needing to instantiate a new instance of the class?
a) protected
b). final
c) static
d)private
a) class
b) object
c) Construct
d) Serializing
a) class
b) object
c) Construct
d) Serializing
a) class
b) object
c) Construct
d) Serializing
14) _______an object means converting it to a byte stream representation that can be
stored into file.
a) class
b) object
c) Construct
d) Serializing
a) Abstract class
b) Interface
c) Encapsulation
d) inheritance.
a) Abstract class
b) Interface
c) Encapsulation
d) inheritance.
a) Abstract class
b) Interface
c) Encapsulation
d) inheritance.
b) Interface
c) Encapsulation
d) inheritance.
19) Constant name are proceeded by _____ like a normal variable declaration.
a) Abstract class
b) dollar sign($)
c) Encapsulation
d) inheritance.
20) _______ is available when a method is called from within an object context
a) Abstract class
b) dollar sign($)
c) $this
d) inheritance.
21) in PHP, An _____is a special variable, which can hold more than one value at
a time.
a) array
b) structure
c) csss
d) none of these
b) Associative arrays -
c) Multidimensional arrays -
23) in PHP ,The____ function is used to return the length (the number of
elements) of an array:
a) count
b) min
c) abs
d) sqrt()
24) The index can be assigned automatically (index always starts at 0), like
this:
a) true
b) false
c) both a and b
d) none of these
25) The _____ functions can be used to find the lowest or highest value in a list of
arguments:
26) The _____ function returns the absolute (positive) value of a number:
a) count
b) min
c) abs
d) sqrt()
a) count
b) min
c) abs
d) sqrt()
a) round
b) min
c) abs
d) sqrt()
a) rand
b) min
c) abs
d) sqrt()
a) define()
b) min()
c) abs()
d) sqrt()
31) In PHP7, you can create an Array constant using the ____ function.
a) define()
b) min()
c) abs()
d) sqrt()
different conditions.
a) switch
b) min
c) abs
d) sqrt()
33) The PHP ____function formats a timestamp to a more readable date and time.
a) date()
b) min()
c) abs()
d) sqrt()
34) A ______is a small file that the server embeds on the user's computer. Each
time the same computer requests a page with a browser, it will send the cookie too.
With PHP, you can both create and retrieve cookie values.
a) cookie
b) session
c) abs
d) sqrt
a) cookie
b) session
c) abs
d) sqrt
d) none of these
object.
a) classes
b) constructor
c) object
d) none of these
38) If you create a __construct() function, PHP will automatically call this
a) true
b) false
c) both a and b
d) none of these
39) A ______is called when the object is destructed or the script is stopped or
exited.
a) destructor
b) constructor
c) object
d) none of these
40) If you create a __destruct() function, PHP will automatically call this
a) true
b) false
c) both a and b
d) none of these
Answer of unit 1:
1(c) 2(a) 3(d) 4(b) 5(c) 6(c) 7(a) 8(b) 9(d) 10(c) 11(a) 12(b) 13(c) 14(d) 15(d) 16(b) 17(c) 18(a)
19(b) 20(c) 21(a) 22(d) 23(a) 24(a) 25(b) 26(c) 27(d) 28(a) 29(a) 30(a) 31(a) 32(a) 33(a) 34(a)
35(b) 36(a) 37(b) 38(a) 39(a) 40(a)
d) non of theses
a) S_client
b) S_server
c) dynamic
d) non of these
a) Authentication
b) Authority
c) Responsibility
d) none of these
4) _____________ is a php super global variable which is used to access global
a)$_ localb
b) $_Global
c) Client
d) none of these
5)The size of file can be limited using _________ limit and _____________ limit.
c) mg and gb
d) none of these
a) set-cookie()
b) create Cookie ()
c) make Cooking()
d) none of these
a)implementation
b) interface
c) improved
d) none of these
8) Data source name in pear DB is _________
a) String
b) character
c) float
d) int
b) mysql
c) pear db
d) data
a) DDL
b) DML
c) DIL
d) none of these
a) get
b) Post
c) Server
d) Client
d) none of these
13) Get and ________ are two HTTP methods that a client use to pass from data
server.
a) get
b) Post
c) Server
d) Client
a) select tag
b) text tag
c) list tag
d) none of these
a) $Files
b) $load
c) $New
d) none of these
b) client slide
c)compiler
d) none of these
a) WWW
b) HTML
c) TCP
d) FTP
18) Communication between client computers and web servers is done by sending
_________________.
d) none of these
19) A ______is a small file that the server embeds on the user's computer. Each time
the same computer requests a page with a browser, it will send the ________ too.
a) Prepared
b) fetch
c) array
d) SSL
a) Mysql
b)SSL
b) Fetch
d) none of these
both.
a) fetch array()
b) Cookie()
c) S_Array()
d) D_array()
b) Mysql
c) http
d) none of these
24) __________ function is used to change the default database for the connection.
a) fetch_array()
b) Cookie()
c) S_Array()
d) mysqli_select_db()
a) extends
b) constructor
c) object
d) none of these
26) Abstract classes and methods are when the parent class has a named method,
a) true
b) false
c) both a and b
d) none of these
27) An abstract class is a class that contains at least one abstract method. An
abstract method is a method that is declared, but not implemented in the code.
a) true
b) false
c) both a and b
d) none of these
28) When inheriting from an abstract class, the child class method must be defined
with the same name, and the same or a less restricted access modifier.
a) true
b) false
c) both a and b
d) none of these
29) Interfaces allow you to specify what methods a class should implement.
a) true
b) false
c) both a and b
d) none of these
a) interface
b) abstract class
c) implements
d) None of these
interfaces and abstract classes are Interfaces cannot have properties, while
b) abstract class
c) implements
d) None of these
a) interface
b) abstract class
c) implements
d) None of these
33) In PHP, there are three types of arrays one is not type of array in php
which one:
a) Indexed arrays -
b) Associative arrays -
c) Multidimensional arrays -
d) polygamy array
a) true
b) false
c) both a and b
d) none of these
35) Classes and objects are the two main aspects of __________________
a) object oriented programming
d) none of these
36) A constructor allows you to initialize an object's properties upon creation of the
object.
a) true
b) false
c) both a and b
d) none of these
37) If you create a _______function, PHP will automatically call this function when
a) __construct()
b) ___destruct()
c) both a and b
d) none of these
38) A destructor is called when the object is destructed or the script is stopped or
exited.
a) true
b) false
c) both a and b
d) none of these
39) A cookie is a small file that the server embeds on the user's computer. Each
time the same computer requests a page with a browser, it will send the cookie too.
With PHP, you can both create and retrieve cookie values.
a) true
b) false
c) both a and b
d) none of these
a) true
b) false
c) both a and b
d) none of these
1(a) 2(b) 3(a) 4(b) 5(a) 6(a) 7(c) 8(a) 9(a) 10(a) 11(d) 12(a) 13(b) 14(a) 15(a) 16(a) 17(a) 18(a)
19(a) 20(a) 21(a) 22(a) 23(a) 24(d) 25(a) 26(a) 27(a) 28(a) 29(a) 30(a) 31(a) 32(c) 33(d) 34(a)
35(a) 36(a) 37(a) 38(a) 39(a) 40(a)
Unit - 3: Databases
1) Which one of the following databases has PHP supported almost since the
beginning?
a) Oracle Database
b) SQL
c) SQL+
d) MySQL
3) Which method returns the error code generated from the execution of the last
MySQL function?
a) errno()
b). errnumber()
c). errorno()
d) errornumber()
a). TRUE
b). FALSE
c). Empty String
b) include „filename‟;
c) include <filename>
d) none of these
result set?
a) destroy()
b) remover()
c) alloc()
d) free()
7) Which one of the following methods can be used to diagnose and display
a). connect_errno()
b) connect_error()
c) mysqli_connect_errno()
d). mysqli_connect_error()
8)Which method retrieves each row from the prepared statement result and assigns
the fields to the bound results?
a) get_row()
b). fetch_row()
c). fetch()
d) row()
9) Which one of the Following methods is responsible for sending the query to
Database
a) query()
b) send_query( )
c) sendquery()
d) query_send()
a) &&
b) /*….*/
c) #
d) %
a) database
b) command
c) Query
d) none of these
12) ________ is used to uniquely identify the rows in table.
a) primary key
b) Database
c) not null
d) none of these
13) _____ returns the last error description for the most recent function call
a) Error no
b) Zero no
c) no error
d) none of these
a) Wamp
b) World
c) Excel
d) none of these
d) none of these
a) create
b) close
c) connect
d) none of these
a) create
b) close
c) connect
d) none of these
a) Word press
b) Lotus
c) Word star
d) none of these
a) error
b) Connect
c) create
d) none of these
d) None of these
21) the switch statement is used to perform different actions based on different
conditions
a) true
b) false
c) both a and b
d) none of these
a) while loop
b) for loop
c) foreach
a. ) class name()
b) _construct()
c) function _construct()
d) function __construct(
b). PHP 5
d). PHP 6
25) Which one of the following functions is used to determine whether a class exists?
a). exist()
b.) exist_class()
c )class_exist()
d.txist()
26) Which one of the following functions is used to determine object type?
a.) obj_type()
b) type()
c ) is_a()
d) is_obj()
27) Which one of the following keyword is used to inherit our subclass into a super
class?
a). extends
b). implements
c). inherit
d). include
28) In the PHP code given below, what is/are the properties?
< ?php
class Example
public $name;
function Sample()
?>
c) class Example
29) Which keyword is used to refer to properties or methods within the class itself?
a). private
b) public
c) protected
d). $this
30) Which keyword allows class members (methods and properties) to be used without
b). final
c) static
d)private
a) get
b) Post
c) Server
d) Client
d) none of these
33) Get and ________ are two HTTP methods that a client use to pass from data
server.
a) get
b) Post
c) Server
d) Client
b) text tag
c) list tag
d) none of these
a) $Files
b) $load
c) $New
d) none of these
a) Sever side
b) client slide
c) c++
d) none of these
a) create
b) close
c) connect
d) none of these
a) Word press
b) Lotus
c) Word star
d) none of these .
a) error
b) Connect
c) create
d) none of these
d) None of these
Answer of unit 3:
1(d) 2(a) 3(a) 4(c) 5(b) 6(d) 7(c) 8(c) 9(a) 10(c) 11(a) 12(a) 13(a)
14(a) 15(a) 16(c) 17(b) 18(a) 19(a) 20(a) 21(a) 22(d) 23(b) 24(b) 25(a) 26(a)
27(a) 28(a) 29(a) 30(b) 31(d) 32(a) 33(b) 34(a) 35(b) 36(a) 37(a) 38(a) 39(a)
40(a)
Unit - 4: XML
a)design
b) store
c) delete
d) none of these
a) true
b) false
c) not know
a) true
b) false
c) not know
a) structure
b) element
c) Attribute
d) html
5) An XML tree start at root element and end at its child elements,
a) true
b) false
c) not know
6) We can create our own tags in Xml , but it must properly defined and end.
a) true
b) false
c) not know
b) only attribute
c) element
d) none of these
8)________ define the properties and method for accessing and editing xml & html
document
a) Xml_DOM
b) XML-Persor
c) HTMl
d) none of these
9) Xml is use to separate the_____ form design.
a) Data
b) table
c) file
d) none of these
a) tag
b) data
c) file
d) table
11) The _______ defines a standard way for accessing and manipulating HTML
a) HTML DOM
b) CSS
c) XML
d) Form
a)HTML
b) xml
c) css
d) none of these
13 )_________ is a software and hardware independent tool used to transport and
a) XML
b) HTML
c) CSS
d) none of these
a) true
b) false
c) both
d) none of these
a) true
b) false
c) both
d) none of these
16)______is designed to read the XML and create a way for programs to use XML.
a) XML PERSOR
b) CSS
c) XML-TREE
d) None of these
17) An_________starts at a root element and branches from the root to child
elements.
a) XML PERSOR
b) CSS
c) XML-TREE
d) None of these
18) The abs() function returns the absolute (positive) value of a number:
a) true
b) false
c) both a and b
d) none of these
a) true
b) false
c) both a and b
d) none of these
20) The round() function rounds a floating-point number to its nearest integer:
a) true
b) false
c) both a and b
d) none of these
21) The rand() function generates a random number:
a) true
b) false
c) both a and b
d) none of these
a)design
b) store
c) delete
d) none of these
23) ________ is a server scripting language, and a powerful tool for making dynamic
a) PHP
b) java script
c) Angular js
d) none of these
object…
a) PHP
b) java script
c) Angular js
d) none of these
a) PHP
b) java script c
c) Angular js
d) none of these
a) .PHP
b) .js
c) .Ajs
d) none of these
27) __________ 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
28) A PHP script starts with <?php and ends with ?>:
<?php
?>
a) true
b) false
c) both a and b
d) none of these
29) 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
30) PHP files can contain text, HTML, CSS, JavaScript, and PHP code
a) true
b) false
c) both a and b
d) none of these
31) 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
32) 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
a) wide
b) small
c) short
d) none of these
a) String
b) Integer
a)Increment/Decrement operators
b)Logical operators
c)String operators
36) The basic assignment operator in PHP is __________ It means that the left operand
b) ++
c) ==
d) ?
37) the _________ statement is used to perform different actions based on different
conditions
a) switch
b) if condition
c) foreach
d) while
a) while loop
b) for loop
c) foreach
in a program.
a) function
b) procedure
c) block
d) loop
40) In php A function will not execute automatically when a page loads.
a) true
b) false
c) both a and b
d) none of these
Answer of unit 4:
==================//========================
1(b) 2(b) 3(a) 4(b) 5(a) 6(a) 7(a) 8(a) 9(a) 10(a)
11(a) 12(a) 13(a) 14(a) 15(a) 16(a) 17(c) 18(a) 19(a) 20(a)
21(a) 22(b) 23(a) 24(a) 25(a) 26(a) 27(a) 28(a) 29(a) 30(a)
31(a) 32(a) 33(a) 34(d) 35(d) 36(a) 37(b) 38(d) 39(a) 40(a)
Unit - 5: Ajax
a) Ajax
b) xml
c) HTML
d) non of these
a) Ajax
b) xml
c) HTML
d) CSS
a) google map
b) msword
c) php
d) yahoo.com
a) Jquery
b) json
c) jphp
d) http
5) Jquery ajax is usefull while working with forms it consist of serialization ,client side ,
validation ,it is
a) true
b) false
d) not know
a) true
b) false
d) not know
d) non of these
d) none of these
10) In Ajax XMLHttpRequest this object is used to exchange data with web server .
a) true
b) false
c) both
d) none of these
11) __________Reduce the traffic travels between the client and the server
a) Ajax
b) HTML
c) xml
d) UDDI
12) The ajaxStart and ajaxStop are ______ that relate to all Ajax requests together
a) event
b) properties
c) object
d) none of these
13) SOAP supports document-level transfer
a) true
b) false
c) both
d) none of these
14) XML-RPC is more about values transfer, although it can transfer structures such as
a) true
b) false
c) both
d) none of these
executed when the server response is ready, and sends the request off to the server.
a) LoadDoc ()
b) UDDI
c) AjaxStrart()
d) none of these
executed when the server response is ready, and sends the request off to the server.
a) true
b) false
c) both a and b
d) none of these
1) true
b) false
c) both a and b
d) none of these
d) none of these
d) none of these
20) In Ajax XMLHttpRequest this object is used to exchange data with web server .
a) true
b) false
c) both
d) none of these
21) ______is a new technique for creating better, faster, and more interactive web applications
a)Ajax
b) XML
c) SimpleXML
d) BBEdit
a)Ajax
b) XML
c) SimpleXML
d) BBEdit
23) PHP 5's new ______ module makes parsing an XML document, well, simple. It turns an
XML document into an object that provides structured access to the XML.
a)Ajax
b) XML
c) SimpleXML
d) BBEdit
24) While writing your PHP program, it is a good idea to use PHP-aware editors like ____
a)Ajax
b) XML
c) SimpleXML
d) BBEdit
a) true
b) false
c) both a and b
d) none of these
26) A class that is inherited from by another class. This is also called a ____
a)child class
b) class
c) member function
27) ________ a type of polymorphism in which some or all of operators have different
a)overloading
b) data Abstraction
c) Encapsulation
d) member function
28) ________Any representation of data in which the implementation details are hidden
a)overloading
b) data Abstraction
c) Encapsulation
d) member function
29)__________ refers to a concept where we encapsulate all the data and member functions
a)overloading
b) data Abstraction
c) Encapsulation
d) member function
30) __________ These are the function defined inside a class and are used to access object
data.
a)child class
b) class
c) member function
d)parent Class
31) ________ This is a programmer-defined data type, which includes local functions as well as
local data.
a)child class
b) class
c) member function
d)parent Class
32)_______ A class that inherits from another class. This is also called a subclass or derived
class.
a)child class
b) class
c) member function
d)parent Class
33)_________ An array with a numeric index. Values are stored and accessed in linear fashion.
a) associative array
b) multidimensional array
c) Numeric array
d) None of these
34) ____________An array with strings as index. This stores element values in association with
a) associative array
b) multidimensional array
c) Numeric array
d) None of these
35) __________ An array containing one or more arrays and values are accessed using
multiple indices
a) associative array
b) multidimensional array
c) Numeric array
d) None of these
a) true
b) false
c) both a and b
d) none of these
37) There are two types of validation are available in PHP. They are as follows −
a)Client-Side Validation
a) Client-Side Validation
39)___________ After submitted by data, The data has sent to a server and perform validation
a) Client-Side Validation
40) Core PHP means solving a Mathematical problem by using paper and pen and Frame work
a) true
b) false
c) both a and b
d) none of these
1(a) 2(a) 3(a) 4(a) 5(a) 6(a) 7(a) 8(a) 9(c) 10(a)
11(a) 12(a) 13(a) 14(a) 15(a) 16(a) 17(a) 18(a) 19(c) 20(a)
21(a) 22(b) 23(c) 24(d) 25(a) 26(d) 27(a) 28(b) 29(c) 30(c)
31(b) 32(a) 33(c) 34(a) 35(b) 36(a) 37(d) 38(a) 39(b) 40(a)