C++ Programming | MCQs

    Q1: Who was the founder of C programming language?

    سی پروگرامنگ لینگویج کا بانی کون تھا؟
    • A. Bjarne Stroustrup
    • B. James A. Gosling
    • C. Billgates
    • D. Dennis Ritchie

    Q2: Which modules is not part of C programming?

    کون سا ماڈیول سی پروگرامنگ کا حصہ نہیں ہے؟
    • A. Linker
    • B. Converter
    • C. Editor
    • D. Compiler

    Q3: The operating system UNIX was written in _____?

    آپریٹنگ سسٹم یونکس _____ میں لکھا گیا تھا؟
    • A. C++
    • B. None of these
    • C. JAVA
    • D. C
    • A. clrscr();
    • B. scanf();
    • C. None of these
    • D. clear_screen();

    Q5: What does the getche() function do in C/C++?

    سی آر سی پلس پلس میں گیٹ سی ایچ () فنکشن کیا کرتا ہے؟
    • A. It will display the character on the screen that user has entered
    • B. It reads a string from the user
    • C. None of these
    • D. It reads a character from the keyboard without displaying it on the screen
    • A. Compiler will generate error
    • B. z will be converted to long and z will be calculated as int
    • C. y will be converted to int and z will be calculated as int
    • D. z will be converted to long and z will be calculated as long

    Q7: In C programming, the loop that is executed at least once (even if the condition is false) is called ______ loop.

    سی پروگرامنگ میں ، لوپ جو کم از کم ایک بار انجام دیا جاتا ہے (یہاں تک کہ اگر حالت غلط ہے) کو ______ لوپ کہا جاتا ہے۔
    • A. None of these
    • B. do-while
    • C. while
    • D. for

    Q8: In C Language, the function getchar() _____?

    سی زبان میں ، فنکشن گیٹچار () _____؟
    • A. Reads a character from the keyboard with echo
    • B. Requires pressing the "Enter" key after entering the character
    • C. Reads a string until the user presses the "Enter" key
    • D. Reads a character from the keyboard without echo

    Q9: Which of the following is TRUE for a variable defined with the keyword const and initialized to a value in C language?

    مندرجہ ذیل میں سے کون سا متغیر کے لئے صحیح ہے جو مطلوبہ الفاظ کے ساتھ بیان کیا گیا ہے اور سی زبان میں کسی قدر سے شروع کیا گیا ہے؟
    • A. Can be changed within the scope of the variable
    • B. Can be overwritten within the scope of the variable
    • C. Does not differ from the variable that is declared without const and initialized
    • D. Cannot be changed within the scope of the variable during execution of the program

    Q10: Which of the following does NOT qualify to be the name of a variable in C language?

    مندرجہ ذیل میں سے کون سی زبان میں متغیر کا نام بننے کے اہل نہیں ہے؟
    • A. "age"
    • B. "name"
    • C. "define"
    • D. "address"
✅ Correct: 0 | ❌ Wrong: 0 | 📊 Total Attempted: 0