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 |
write a c program to find largest of three numbers using simple if only for one time.
please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch
Explain what is the heap?
Explain what is wrong with this program statement?
List some applications of c programming language?
Apart from dennis ritchie who the other person who contributed in design of c language.
#include<stdio.h> int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20
Multiply an Integer Number by 2 Without Using Multiplication Operator
How will you find a duplicate number in a array without negating the nos ?
What is the code for 3 questions and answer check in VisualBasic.Net?
Explain the difference between #include "..." And #include <...> In c?
Write a c program to enter a string of paragraph and replacing a particular word which is repeated in the paragraph by another word?
2 Answers ME, Synfusion, Wipro,