• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
What is the issue in the following C++ function? void show(int x = 5, int y = 10)
  1. Default values are not allowed in functions
  2. Default parameters must be declared from right to left
  3. Parameters must be initialized to zero
  4. Function syntax is invalid
Explanation
  • In C++, default arguments must be assigned from right to left.
  • If a parameter has a default value, all parameters to its right must also have defaults.
  • The rule ensures unambiguous function calls.
  • Related MCQs

    ڈاس آپریٹنگ سسٹم کس پر مبنی ہے؟
    1. Graphical User Interface
    2. Command Line Interface (CLI)
    3. Touch User Interface
    4. Voice User Interface
    اس سوال کو وضاحت کے ساتھ پڑھیں

    1. Fourth generation computer
    2. First generation computer
    3. Third generation computer
    4. Second generation computer
    5. None of these
    اس سوال کو وضاحت کے ساتھ پڑھیں

    پاس ورڈ توڑنے یا اندازے سے معلوم کرنے کے عمل کو عام طور پر کیا کہا جاتا ہے؟
    1. Hacking
    2. Phishing
    3. Cracking
    4. Formatting
    اس سوال کو وضاحت کے ساتھ پڑھیں

    معیاری اے ایس سی آئی آئی میں کتنے حروف ہوتے ہیں؟
    1. 28
    2. 1024
    3. 512
    4. 128
    5. 928
    اس سوال کو وضاحت کے ساتھ پڑھیں

    سادہ زبان کو مشینی زبان میں تبدیل کرنے کے عمل کو کیا کہتے ہیں؟
    1. Compiler
    2. Modem
    3. Interpreter
    4. Translator
    اس سوال کو وضاحت کے ساتھ پڑھیں

    All Rights Reserved © TestPointpk.com