belongs to collection: C interview questions, your interviewer might ask
When should we use const in a C program?
There are the following places where we need to use the const keyword in the programs.
int PrintData ( const char *pcMessage);
const int ciData = 100;
const volatile uint32_t *DEVICE_STATUS = (uint32_t *) 0x80102040;
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Answer:
There are the following places where we need to use the const keyword in the programs.
- When you don’t want to change the value of an initialized variable.
 
need an explanation for this answer? contact us directly to get an explanation for this answer