Tag: daily knowledge

  • PHP Questions & Answers – Arrays – 5

    PHP Questions & Answers – Arrays – 5

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Arrays – 5”. Q 1. What will be the output of the following PHP code? <?php $fruits = array (“mango”, “apple”, “pear”, “peach”); $fruits = array_flip($fruits); echo ($fruits[0]); ?> A. mangoB. 0C. peachD. error Show Answer Answer:-D. error Explanation As we are flipping the values, $fruits[“mango”]…

  • PHP Coding Questions and Answers – Arrays – 4

    PHP Coding Questions and Answers – Arrays – 4

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Arrays – 4”. Q 1. What will be the output of the following PHP code? A. I like Volvo BMW and Toyota.B. I like Volvo, BMW and Toyota)C. I like Volvo, BMW and Toyota.D. I like. Volvo.,. BMW. and. Toyota) Show Answer Answer:-C. I like Volvo,…

  • PHP Coding Questions and Answers – Arrays – 3

    PHP Coding Questions and Answers – Arrays – 3

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Arrays – 3”. Q 1. What will be the output of the following PHP code? <?php $age = array(“Harry” => “21”, “Ron” => “23”,”Malfoy” => “21”); array_pop($age); print_r(array_change_key_case($age, CASE_UPPER)); ?> A. Array ( [HARRY] => 21 [RON] => 23 )B. Array ( [HARRY] => 21 [RON]…

  • Current Affairs Quiz – March 2025

    Current Affairs Quiz – March 2025

    Q 1.What is the theme of International Women’s Day 2025? A. Gender equality today for a sustainable tomorrowB. DigitALL: Innovation and Technology for Gender EqualityC. Invest in women: Accelerate progressD. For ALL Women and Girls: Rights. Equality. Empowerment Show Answer Answer:-D. For ALL Women and Girls: Rights. Equality. Empowerment Explanation International Women’s Day is celebrated…

  • Python Questions and Answers – List Comprehension – 2

    Python Questions and Answers – List Comprehension – 2

    Python Multiple Choice Questions & Answers (MCQs) focuses on “List Comprehension – 2”. Q 1. Read the information given below carefully and write a list comprehension such that the output is: [‘e’, ‘o’] w=”hello” v=(‘a’, ‘e’, ‘i’, ‘o’, ‘u’) A. [x for w in v if x in v]B. [x for x in v if…

  • Python Questions and Answers – List Comprehension – 1

    Python Questions and Answers – List Comprehension – 1

    Python Multiple Choice Questions & Answers (MCQs) focuses on “List Comprehension – 1”. Q 1. What will be the output of the following Python code? l=[1,2,3,4,5] [x&1 for x in l] A. [1, 1, 1, 1, 1]B. [1, 0, 1, 0, 1]C. [1, 0, 0, 0, 0]D. [0, 1, 0, 1, 0] Show Answer Answer:-B.…

  • Python Questions and Answers – Matrix List Comprehension

    Python Questions and Answers – Matrix List Comprehension

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Matrix List Comprehension”. Q 1. Which of the following matrices will throw an error in Python?A. A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] B. B = [[3, 3, 3] [4, 4, 4] [5, 5, 5]] C. C = [(1, 2, 4), (5,…

  • PHP Multiple Choice Questions – Array

    PHP Multiple Choice Questions – Array

     PHP Multiple Choice Questions & Answers (MCQs) focuses on “Array”. Q 1. PHP’s numerically indexed array begin with position ___________A. 0B. 1C. 2D. -1 Show Answer Answer:-A. 0 Explanation Like all the other programming languages, the first element of an array always starts with ‘0’. Q 2. Which of the following are correct ways of…

  • Python Multiple Choice Questions – List Comprehension

    Python Multiple Choice Questions – List Comprehension

     Python Multiple Choice Questions & Answers (MCQs) focuses on “List Comprehension”. Q 1. What will be the output of the following Python code snippet? k = [print(i) for i in my_string if i not in “aeiou”] A. prints all characters of my_string that aren’t vowelsB. prints all the consonants in my_stringC. prints all the vowels…

  • C++ Programming Questions and Answers – Abstract Classes – 2

    C++ Programming Questions and Answers – Abstract Classes – 2

    C++ Programming Multiple Choice Questions & Answers (MCQs) focuses on “Abstract Classes – 2”. Q 1. What is an abstract class in C++?A. Class specifically used as a base class with at least one virtual functionsB. Class specifically used as a base class with at least one pure virtual functionsC. Class from which any class…

You cannot copy content of this page