Programming MCQS - QUESTION DETAILS

How do you use the 'const' keyword with a pointer in C?
A. const *ptr;
B. *const ptr;
C. const ptr;
D. const int *ptr;

'const' after '*' makes the pointed data constant.

Similar Questions

How do you define a macro in C?






What does the 'exit()' function do in C?






What is the purpose of the 'strncpy' function in C?






What is the output of printf("%d", 5 << 2);?






How do you declare a constant integer in C?






Which header file is needed for file input and output operations in C?






What is the purpose of the 'strchr' function in C?






What is the purpose of the 'strtok' function in C?






What is the purpose of the 'enum' keyword in C?






How do you declare a two-dimensional array in C?