How to access or modify the const variable in c ?
Answer Posted / vignesh
@Ramya
const value cannot be changed...you declared it wrong,
int *ptr = &x;
is not correct.It should be,
int ptr = &x;
also,according to your program only the *ptr value is 20 and
not the value of x
| Is This Answer Correct ? | 5 Yes | 51 No |
Post New Answer View All Answers
Why static variable is used in c?
How can I find the modification date and time of a file?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What are the advantages of c language?
What is wild pointer in c?
what are # pragma staments?
How can you draw circles in C?
Write a program to implement queue.
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
about c language
What are the different file extensions involved when programming in C?
Can I initialize unions?
What is the difference between array and pointer?
Implement bit Array in C.
What is the difference between scanf and fscanf?