Which of the following is TRUE for a variable defined with the keyword const and initialized to a value in C language?
مندرجہ ذیل میں سے کون سا متغیر کے لئے صحیح ہے جو مطلوبہ الفاظ کے ساتھ بیان کیا گیا ہے اور سی زبان میں کسی قدر سے شروع کیا گیا ہے؟
- Can be overwritten within the scope of the variable
- Does not differ from the variable that is declared without const and initialized
- Cannot be changed within the scope of the variable during execution of the program
- Can be changed within the scope of the variable
Explanation
A variable declared with the const keyword in C becomes read-only and its value cannot be modified after initialization.
Attempting to change a const variable will result in a compile-time error.
Related MCQs
ایپلیکیشن لینگویج کو کس قسم کی زبان بھی کہا جاتا ہے؟
- High-level language
- Low-level language
- Machine language
- Assembly language
اس سوال کو وضاحت کے ساتھ پڑھیں
میک آپریٹنگ سسٹم کو _____ نے تیار کیا ہے؟
- Samsung
- Microsoft
- Apple
- IBM
اس سوال کو وضاحت کے ساتھ پڑھیں
ایک مرتب کیا ہے؟
- A compiler is a special program that processes statements written in a particular programming language and turns them into machine language
- A compiler is a language providing very efficient execution
- A compiler does a conversion line by line as the program is run
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
درج ذیل میں سے کون سا اینڈرائیڈ کے آفیشل ورژن کا کوڈ نام نہیں ہے؟
- Muffin
- Cupcake
- Donut
- Lollipop
اس سوال کو وضاحت کے ساتھ پڑھیں
کسی ویب سائٹ کو صارف کی شناخت یاد رکھنے میں کون سی چیز مدد دیتی ہے؟
- Cookies
- Firewall
- Cache
- Compiler