Programming MCQS - QUESTION DETAILS

How do you declare a constant pointer in C?
A. const *ptr;
B. *const ptr;
C. const ptr;
D. const int *ptr;

'const' after '*' makes the pointer itself constant.

Similar Questions

What is the output of printf("%s", "Hello" + 1);?






What is the role of the 'auto' keyword in C?






How do you define a constant pointer to a constant integer in C?






What is the output of printf("%c", 'a' - 32);?






Which method is used to read data from the keyboard in Java?






How do you define a multi-line macro in C?






What is the purpose of the 'finalize' method in Java?






What is the output of System.out.println("Java" == "Java");?






Which of the following is a correct way to create an ArrayList in Java?






What is the output of System.out.println(10 / 3.0);?