Top 50+ Solved Web Techniques MCQ Questions Answer

From 31 to 40 of 40

Q. To implement an interface, a class must use the______ keyword.

a. interface

b. abstract class

c. implements

d. None of these

  • c. implements

Q. In PHP, there are three types of arrays one is not type of array in phpwhich one:

a. Indexed arrays -

b. Associative arrays -

c. Multidimensional arrays -

d. polygamy array

  • d. polygamy array

Q. An inherited class is defined by using the extends keyword.

a. true

b. false

c. both a and b

d. none of these

  • a. true

Q. Classes and objects are the two main aspects of __________________

a. object oriented programming

b. constructor and destructor

c. object and array

d. none of these

  • a. object oriented programming

Q. A constructor allows you to initialize an object's properties upon creation of theobject.

a. true

b. false

c. both a and b

d. none of these

  • a. true

Q. If you create a _______function, PHP will automatically call this function whenyou create an object from a class.

a. __construct()

b. ___destruct()

c. both a and b

d. none of these

  • a. __construct()

Q. A destructor is called when the object is destructed or the script is stopped orexited.

a. true

b. false

c. both a and b

d. none of these

  • a. true

Q. A session is a way to store information (in variables) to be usedacross multiple pages.

a. true

b. false

c. both a and b

d. none of these

  • a. true
Subscribe Now

Get All Updates & News