C Programming | MCQs

    Q1: Who was the founder of C programming language?

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

    Q2: Which modules is not part of C programming?

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

    Q3: The operating system UNIX was written in _____?

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

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

    سی آر سی پلس پلس میں گیٹ سی ایچ () فنکشن کیا کرتا ہے؟
    • A. It reads a string from the user
    • B. None of these
    • C. It will display the character on the screen that user has entered
    • 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. for
    • B. None of these
    • C. while
    • D. do-while

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

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

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

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

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

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