Variable | MCQs

    Q1: A quantity whose value may change during execution of the program is called a _____?

    ایک مقدار جس کی قیمت پروگرام پر عمل درآمد کے دوران بدل سکتی ہے اسے _____ کہا جاتا ہے؟
    • A. Constant
    • B. None of these
    • C. Variable
    • D. Header
    • A. cin>>age;
    • B. cin<<age;
    • C. cin(age)
    • D. None of these
    • A. z will be converted to long and z will be calculated as long
    • B. y will be converted to int and z will be calculated as int
    • C. z will be converted to long and z will be calculated as int
    • D. Compiler will generate error

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

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

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

    مندرجہ ذیل میں سے کون سی زبان میں متغیر کا نام بننے کے اہل نہیں ہے؟
    • A. "age"
    • B. "address"
    • C. "define"
    • D. "name"
    • A. may not
    • B. may
    • C. must not
    • D. must
    • A. Register
    • B. codes
    • C. calling function
    • D. Memory space

    Q8: Scope of variable refers to

    متغیر کے دائرہ کار سے کیا مراد ہے۔
    • A. length of variable
    • B. name of variable
    • C. none
    • D. accessibility of variable
    • A. None of these
    • B. Character variable
    • C. String variable
    • D. Integer variable

    Q10: Which function is used to get values into variables from the keyboard during the execution of a program?

    پروگرام کے عمل کے دوران کی بورڈ سے متغیرات میں ویلیو حاصل کرنے کے لیے کون سا فنکشن استعمال ہوتا ہے؟
    • A. Printf()
    • B. Scanf()
    • C. Main()
    • D. Getch()
✅ Correct: 0 | ❌ Wrong: 0 | 📊 Total Attempted: 0