in statement " char*const q= "kPIT" ;" q is
Answers
Answered by
2
Answer:
kYa hee yeh bat0 ...idk ..
Answered by
1
Answer:
q is a constant pointer ;
Explanation:
the given instruction is : char*const q= "kPIT" ;
- here 'char' keyword indicates the pointer is a character pointer.
- const qualifier has been placed between the pointer sign (*) and the string variable which implies the 'pointer is constant but the string is not'.
- we can explain it like this way: char *const q="kPIT"; *q='M'; / *works; we can change the string*/ q="Bye" ; /* error; pointer q can't store the bade address of another String i.e. it can't point a different Strinng */
Similar questions