What is a const pointer, and how does it differ from a pointer to a const?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / glibwaresoftsolutions
1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.
Is This Answer Correct ? | 0 Yes | 0 No |
Explain what are the different file extensions involved when programming in c?
How many keywords are there in c?
write a program to swap Two numbers without using temp variable.
75 Answers EMC, Focus, GreyB, HCL, Hitech, HP, Huawei, Infosys, Mannar Company, Microsoft, Miles Software, Odessa Technologies, Satyam, TCS, Wipro,
How to add two numbers with using function?
What is the difference between mpi and openmp?
plz answer..... a program that reads non-negative integer and computes and prints its factorial
How many main () function we can have in a project?
Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack
What is the difference between calloc() and realloc()?
Differentiate between Macro and ordinary definition.
Write a program to print distinct words in an input along with their count in input in decreasing order of their count
what is differnence b/w macro & functions