Advanced Web Technologies Solved MCQs
Multiple Choice Questions
53 Pages
FT
Contributed by
Falguni Talwar
Loading
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.inClass:- TYBBA(CA) ( Semester VI)Subject :- ADVANCE WEB TECHNOLOGYUnit 1:- Introduction to Object Oriented Programming in PHPQuestion Bank Multiple Choice Questions (MCQ)--------------------------------------------------------------------------------------1)Which method scope prevents a method from being overridden by a subclass?a)Abstractb)Protectedc)Finald)Static2) Which of the following statements are true is/are true about constructors in PHP?(i) PHP 4 introduced class constructors.(ii) Constructors can accept parameters.(iii) Constructors can call class methods or other functions(iv) Class constructors can call on other constructors.(a)All of the mentioned(b) None of the mentioned(c) only i(d) only ii3) PHP recognize constructors by the name.a. ) class name()b) _construct()c) function _construct()d) function __construct()4) Which version of PHP introduced the instance of keyword?a) PHP 4b). PHP 5c). PHP 5.3d). PHP 6
Page 1
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in5) Which one of the following functions is used to determine whether a class exists?a). exist()b.) exist_class()c )class_exist()d.exist()6) Which one of the following functions is used to determine object type?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). extendsb). implementsc). inheritd). include8) In the PHP code given below, what is/are the properties?< ?phpclass Example{public $name;function Sample(){echo "This is an example";}}?>a). echo “This is an example”;b). public $name;c) class Exampled). function sample()9) Which keyword is used to refer to properties or methods within the class itself?a). privateb) publicc) protectedd). $this
Page 2
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in10) Which keyword allows class members (methods and properties) to be used withoutneeding to instantiate a new instance of the class?a) protectedb). finalc) staticd)private11)_________ is a blue print of any object in OOP.a) classb) objectc) Constructd) Serializing12) An _____ is an instance or occurrence of our class.....a) classb) objectc) Constructd) Serializing13) The _____ method starts with two underscores (__).a) classb) objectc) Constructd) Serializing14) _______an object means converting it to a byte stream representation that can bestored into file.a) classb) objectc) Constructd) Serializing15) A class property used by another class is called ______.a) Abstract classb) Interfacec) Encapsulationd) inheritance.
Page 3
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in16) _________is used to support multiple inheritancea) Abstract classb) Interfacec) Encapsulationd) inheritance.17) The ability to hide the details of implementation is known as _____.a) Abstract classb) Interfacec) Encapsulationd) inheritance.18) An _______ is one that cannot be instantiated, only inheriteda) Abstract classb) Interfacec) Encapsulationd) inheritance.19) Constant name are proceeded by _____ like a normal variable declaration.a) Abstract classb) dollar sign($)c) Encapsulationd) inheritance.20) _______ is available when a method is called from within an object contexta) Abstract classb) dollar sign($)c) $thisd) inheritance.21) in PHP, An _____is a special variable, which can hold more than one value ata time.a) arrayb) structurec) csssd) none of these
Page 4
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in22) In PHP, there are three types of arrays:a) Indexed arrays -b) Associative arrays -c) Multidimensional arrays -d) all of the above23) in PHP ,The____ function is used to return the length (the number ofelements) of an array:a) countb) minc) absd) sqrt()24) The index can be assigned automatically (index always starts at 0), likethis:$cars = array("Volvo", "BMW", "Toyota");a) trueb) falsec) both a and bd) none of these25) The _____ functions can be used to find the lowest or highest value in a list ofarguments:a) count & numb) min & maxc) abs & countd) sqrt() & round
Page 5
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in26) The _____ function returns the absolute (positive) value of a number:a) countb) minc) absd) sqrt()27) the _____function returns the square root of a number:a) countb) minc) absd) sqrt()28) The _____function rounds a floating-point number to its nearest integer:a) roundb) minc) absd) sqrt()
Page 6
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in29) The _______ function generates a random number:a) randb) minc) absd) sqrt()30) To create a constant, use the _____ function.is useda) 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()
Page 7
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in32) The ____statement is used to perform different actions based ondifferent conditions.a) switchb) minc) absd) 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. Eachtime 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) cookieb) sessionc) absd) sqrt
Page 8
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in35) A ______ is a way to store information (in variables) to be usedacross multiple pages.a) cookieb) sessionc) absd) sqrt36) _______are the two main aspects of object-oriented programming.a) classes and objectsb) constructor and destructorc) object and arrayd) none of these37) A ______allows you to initialize an object's properties upon creation of theobject.a) classesb) constructorc) objectd) none of these
Page 9
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE-45PROF. YOGESH P.DESHMUKH www.dacc.edu.in38) If you create a __construct() function, PHP will automatically call thisfunction when you create an object from a class.a) trueb) falsec) both a and bd) none of these39) A ______is called when the object is destructed or the script is stopped orexited.a) destructorb) constructorc) objectd) none of these40) If you create a __destruct() function, PHP will automatically call thisfunction at the end of the script.a) trueb) falsec) both a and bd) none of theseAnswer 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)
Page 10
Download this file to view remaining 43 pages
Related documents:
- NUMERICAL METHODS AND OPTIMIZTION - MCQ
- Quantitative Techniques II - Question Bank
- UPSC 2021 Prelims GEOGRAPHY Answer Key with Explanation - Question Bank
- GEOGRAPHY-PAPER-I (2018) - Question Paper
- Mobile Computing Important MCQs - MCQ
- METHODS AND TECHNIQUES ON BUSINESS DATA ANALYSIS - Notes
- Sociology-2 - Notes
- Financial Markets and Banking Operations MCQs - MCQ
- Civil Engineering Paper II QP - Question Paper
- Analytical Reasoning - Question Bank
- History Of The Mughals Fill in the blanks - Question Paper
- 1234 - Assignment
- Psychology (Paper II) 2020 Question Paper - Question Paper
- Political Science and International Relations (Paper I) 2020 Question Paper - Question Paper
- Chemistry (Paper I) 2017 Question Paper - Question Paper
- Retail Management MCQs with Answers - MCQ
- GE6075 Professional Ethics in Engineering - Notes
- Management Accounting MCQs with Answers - MCQ
- History of the USA 1776-1945 Question Bank (Fill in the Blanks) - Question Bank
- Sociology of Indian Society – 2 - Questions with answers - Question Bank