C Programming Constant Variables
Which of the following is TRUE for a variable defined with the keyword const and initialized to a value in C language?
مندرجہ ذیل میں سے کون سا متغیر کے لئے صحیح ہے جو مطلوبہ الفاظ کے ساتھ بیان کیا گیا ہے اور سی زبان میں کسی قدر سے شروع کیا گیا ہے؟
Answer: Cannot be changed within the scope of the variable during execution of the program
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.
This question appeared in
Past Papers (5 times)
ETEA 25 Years Past Papers Subject Wise (Solved) (2 times)
ETEA Past Papers (1 times)
KPK Teacher Past Papers SST PST CT TT PET (2 times)
This question appeared in
Subjects (1 times)
COMPUTER (1 times)
Related MCQs
- A pointer variable may be initialized with
- The coefficient of variable is defined as?
- Once a structure variable has been defined, its members can be accessed using something called the:
- Which of the following does NOT qualify to be the name of a variable in C language?
- A well-defined list of steps for solving a particular problem written in a natural language is called ______?
- The effect of independent variable on dependent variable is studied in?
- The dependence of a variable on two or more than two independent variable, the relation is said to be _____?
- If a variable 'y' depends upon a variable 'x' in such a way that each value of 'x' determines exactly one value of 'y', then we say that
- Language learning processes, like how language is acquired, how language is stored in the brain, how language is accessed and processed by the brain, are studied under?
- The keyword _____ is used to specify two different choices with "if" statement.