by
What is the meaning of the below declarations? 1. const int a; 2. int const a; 3. const int *a; 4. int * const a; 5. int const * a const;c

1 Answer

0 votes
by
  1. The “a” is a constant integer.
  2. Similar to first, “a” is a constant integer.
  3. Here “a” is a pointer to a const integer, the value of the integer is not modifiable, but the pointer is not modifiable.
  4. Here “a” is a const pointer to an integer, the value of the pointed integer is modifiable, but the pointer is not modifiable.
  5. Here “a” is a const pointer to a const integer that means the value of the pointed integer and pointer both are not modifiable.

Related questions

0 votes
0 votes
    Can we declare a variable be both constant and volatile in C?...
asked Jan 23, 2021 by JackTerrance
0 votes
    Why trash rack is used?...
asked Jan 28, 2021 in Education by JackTerrance
0 votes
    Can we have a volatile pointer?...
asked Jan 23, 2021 by JackTerrance
0 votes
    { int ar[] = { 3, 1, 4, 6, 5 }; int ar_size = sizeof(ar) / sizeof(ar[0]); isTriplet(ar, ar_size) ? cout...
asked Dec 9, 2021 in Education by JackTerrance
0 votes
0 votes
    _____________ will produce a sequential vector c( (1,2,3,4,5,6,7,8,9)). (a) Seq(9) (b) Seq ... Functions and Debugging of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Three events A, B and C have probabilities 2/5, 1/3 and 1/2, respectively. Given that P(A ∩ C) = 1/5 and P(B ∩ ... | B) and P(A'∩ C'). Select the correct answer from above options...
asked Nov 20, 2021 in Education by JackTerrance
0 votes
    A and B are events such that P(A) = 0.4, P(B) = 0.3 and P(A ∪ B) = 0.5. Then P (B′ ∩ A) equals A. 2/3 B. 1/2 C. 3/10 D. 1/5 Select the correct answer from above options...
asked Nov 20, 2021 in Education by JackTerrance
0 votes
    In a Certain Country 1/2 of 5 = 3. If the same proportion holds, what is the value of 1/3 of 10 ? A) 4 B) 6 C) 8 D) 10...
asked Feb 12, 2021 in Education by JackTerrance
0 votes
    Arrange the words given below in a meaningful sequence. 1.Presentation 2.Recommendation 3. Arrival 4.Discussion 5.Introduction A) 5, 3, 4, 1, 2 B) ... , 5, 1, 4, 2 D) 5, 3, 1, 2, 4...
asked Feb 14, 2021 in Education by JackTerrance
0 votes
    Can you arrange 9 numerals - 1, 2, 3, 4, 5, 6, 7, 8 and 9 [using each numeral just once] above and below a division line, to create a fraction equaling to 1/3 [one third]?...
asked Feb 13, 2021 in Education by JackTerrance
...