Tag: India
-
Current Affairs Quiz – May, 2023
Q 1. ‘Washington Declaration’ is a bilateral agreement that was signed between the US and which country? A. Canada B. South Korea C. Australia D. UK Show Answer Answer:-B.South Korea Explanation Explanation:- Washington Declaration is a bilateral agreement that was recently signed between the US and South Korea. According to this agreement, while South Korea…
-
Python Quizs Question and Answers Precedence and Associativity – 1
Q 1. The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.A. TrueB. False Show Answer Answer:-A. True Explanation Explanation:- Although the presence of parenthesis does affect the order of precedence, in the case shown above, it is not making a difference. The result of both of these expressions is 1.333333333. Hence the statement…
-
Python Quizs Question and Answers – Basic Operators
Q 1. Which is the correct operator for power(xy)?A. X^yB. X**yC. X^^yD. None of the mentioned Show Answer Answer:-B. X**y Explanation Explanation:- In python, power operator is x**y i.e. 2**3=8. Q 2. Which one of these is floor division?A. /B. //C. %D. None of the mentioned Show Answer Answer:-B. // Explanation Explanation:- When both of…
-
Python Quizs Question and Answers – Variable Names
Q 1. Is Python case sensitive when dealing with identifiers?A. machine dependentB. noC. yesD. none of the mentioned Show Answer Answer:-C. yes Explanation Explanation:- Case is always significant while dealing with identifiers in python. Q 2. What is the maximum possible length of an identifier?A. 31 charactersB. 63 charactersC. 79 charactersD. none of the mentioned…
-
Python Questions and Answers – Numeric Types
Q 1. What is the output of print 0.1 + 0.2 == 0.3?A. TrueB. FalseC. Machine dependentD. Error Show Answer Answer:-B. False Explanation Explanation:- Neither of 0.1, 0.2 and 0.3 can be represented accurately in binary. The round off errors from 0.1 and 0.2 accumulate and hence there is a difference of 5.5511e-17 between (0.1…
-
PHP Quizs Question & Answers Advanced Object-Oriented
Q 1. Which magic method is used to implement overloading in PHP?A. __callB. __invokeC. __wakeupD. __unset Show Answer Answer:-A. __call Explanation When a class implements __call(), then an object of that class is called with a method that doesn’t exist, __call() is called instead. Q 2. The class from which the child class inherits is…
-
PHP Quizs Question & Answers Basics of Oriented-1
Q 1. Which one of the following property scopes is not supported by PHP?A. friendlyB. finalC. publicD. static Show Answer Answer:-A. friendly Explanation PHP supports five class property scopes: public, private, protected, final and static. Q 2. Which one of the following can be used to instantiate an object in PHP assuming class name to…
-
PHP Quizs Question & Answers Arrays – 5
Q 1. What will be the output of the following PHP code? A. Array ( [0] => picture1.JPG [1] => Picture10.jpg [2] => picture2.jpg [3] => picture20.jpg )B. Array ( [0] => picture1.JPG [1] => picture2.jpg [2] => Picture10.jpg [3] => picture20.jpg )C. Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture2.jpg [3]…
-
PHP Quizs Question & Answers Basics – 3
Q 1. Who is the father of PHP?A. Rasmus LerdorfB. Willam MakepieceC. Drek KolkeviD. List Barely Show Answer Answer:-A. Rasmus Lerdorf Explanation PHP was originally created by Rasmus Lerdorf in 1994 Q 2. 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.…
-
PHP Coding Quizs Question & Answers Arrays – 4
Q 1. What will be the output of the following PHP code? A. Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) ) B. Array ( [1] => Array…