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
how many key words availabel in c a) 28 b) 31 c) 32
What is file in c preprocessor?
Is int a keyword in c?
What is build process in c?
How to explain the final year project as a fresher please answer with sample project
Explain how do you declare an array that will hold more than 64kb of data?
What is calloc malloc realloc in c?
How would you obtain the current time and difference between two times?
Can you please explain the difference between exit() and _exit() function?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What are header files in c?
Explain zero based addressing.
What is the difference between a string and an array?
When should a type cast be used?
Why is main function so important?