Tag: MCQ

  • Python Multiple Choice Questions – Dictionary

    Python Multiple Choice Questions – Dictionary

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Dictionary”. Q 1. Which of the following statements create a dictionary?A. d = {}B. d = {“john”:40, “peter”:45}C. d = {40:”john”, 45:”peter”}D. All of the mentioned Show Answer Answer:-D. All of the mentioned Explanation Dictionaries are created by specifying keys and values. Q 2. What will…

  • What Advice Are You Grateful To Share With Others About MS?

    What Advice Are You Grateful To Share With Others About MS?

    If you’re asking for advice about Multiple Sclerosis (MS), here are some thoughtful insights I would share: Ultimately, living with MS is a personal journey, and what works for one person may not work for another. However, embracing a proactive, informed, and compassionate approach to managing your health can make a significant difference. Here’s an…

  • PHP Questions & Answers – Exception Handling

    PHP Questions & Answers – Exception Handling

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Exception Handling”. Q 1. Which version of PHP was added with Exception handling?A. PHP 4B. PHP 5C. PHP 5.3D. PHP 6 Show Answer Answer:-B. PHP 5 Explanation Exception handling was added to PHP with the version 5 release, and further enhanced with version 5.3. Q 2. How…

  • PHP Questions & Answers – Advanced Object-Oriented PHP

    PHP Questions & Answers – Advanced Object-Oriented PHP

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Advanced Object-Oriented PHP”. Q 1. Which of the following advanced OOP features is/are not supported by PHP? i) Method overloadingii) Multiple Inheritanceiii) Namespacesiv) Object CloningA. i)B. ii)C. i) and ii)D. iii) and iv) Show Answer Answer:-C. i) and ii) Explanation The advanced OOP features are: Object…

  • PHP Questions & Answers – Basics of Object-Oriented PHP- 2

    PHP Questions & Answers – Basics of Object-Oriented PHP- 2

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “Basics of Object-Oriented PHP- 2”. Q 1. Which method scope prevents a method from being overridden by a subclass?A. AbstractB. ProtectedC. FinalD. Static Show Answer Answer:-C. Final Explanation When we declare a method is as final then it is not possible to override that method. Methods…

  • C++ Programming Questions and Answers – Class Hierarchies and Abstract Classes

    C++ Programming Questions and Answers – Class Hierarchies and Abstract Classes

    C++ programming questions and answers focuses on “Class Hierarchies and Abstract Classes”. One shall practice these questions to improve their C++ programming skills needed for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C++ programming language. They can…

  • PHP Multiple Choice Questions – OOPs

    PHP Multiple Choice Questions – OOPs

    PHP Multiple Choice Questions & Answers (MCQs) focuses on “OOPs”. Q 1. The practice of separating the user from the true inner workings of an application through well-known interfaces is known as _________A. PolymorphismB. InheritanceC. AbstractionD. Encapsulation Show Answer Answer:-D. Encapsulation Explanation \ In object-oriented PHP encapsulation is a concept of wrapping up or binding…

  • Python Multiple Choice Questions – Tuples

    Python Multiple Choice Questions – Tuples

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Tuples”. Q 1. Which of the following is a Python tuple?A.  [1, 2, 3]B. (1, 2, 3)C. {1, 2, 3}D.  {} Show Answer Answer:-B. (1, 2, 3) Explanation Tuples are represented with round brackets. Q 2. Suppose t = (1, 2, 4, 3), which of the…

  • Python Questions and Answers – Tuples – 2

    Python Questions and Answers – Tuples – 2

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Tuples – 2”. Q 1. What is the data type of (1)?A. TupleB.  IntegerC. ListD. Both tuple and integer Show Answer Answer:-B.  Integer Explanation A tuple of one element must be created as (1,). Q 2. If a=(1,2,3,4), a[1:-1] is _________A. [2,3]B.  (2,3)C. (2,3,4)D.  Error, tuple…

  • 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”]…

You cannot copy content of this page