• 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. Rows
    2. Fields
    3. Records
    4. None of these
    اس سوال کو وضاحت کے ساتھ پڑھیں

    کمپیوٹر سائنس کا بانی کون ہے؟
    1. Augusta Adaming
    2. Allen Turing
    3. Charles Babbage
    4. None of these
    اس سوال کو وضاحت کے ساتھ پڑھیں

    ٹورنگ ٹیسٹ کس سال متعارف کروایا گیا؟
    1. 1936
    2. 1945
    3. 1950
    4. None of these
    اس سوال کو وضاحت کے ساتھ پڑھیں

    ٹورنگ ٹیسٹ کس نے متعارف کروایا؟
    1. Charles Babbage
    2. Alan Turing
    3. Claude Shannon
    4. None of these
    اس سوال کو وضاحت کے ساتھ پڑھیں

    درج ذیل میں سے کون سا اوپن سورس سافٹ ویئر نہیں ہے؟
    1. Microsoft Office
    2. Linux
    3. Android
    4. Mozilla Firefox
    اس سوال کو وضاحت کے ساتھ پڑھیں

    All Rights Reserved © TestPointpk.com