InterviewSolution
| 1. |
Is The Following Code Fragment Correct? Const Int X = 10 ; Int Arr[x] ; |
|
Answer» No, Here, the variable x is first DECLARED as an int so memory is reserved for it. Then it is qualified by a const QUALIFIER. Hence, const qualified OBJECT is not a constant fully. It is an object with read only attributes, and in C, an object associated with memory cannot be USED in array DIMENSIONS. No, Here, the variable x is first declared as an int so memory is reserved for it. Then it is qualified by a const qualifier. Hence, const qualified object is not a constant fully. It is an object with read only attributes, and in C, an object associated with memory cannot be used in array dimensions. |
|