• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
What will happen in the following C++ code? extern void display(); int main() { display(); }
  1. Program runs successfully
  2. Compile-time syntax error
  3. Undefined reference (linker error)
  4. Infinite loop
Explanation
  • The extern keyword declares a function without providing its definition.
  • display() is called in main, but the compiler cannot find its actual implementation.
  • Compilation passes the syntax check, but linking fails.
  • The linker reports an undefined reference error.
  • 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