How to access or modify the const variable in c ?
Answer Posted / varunreddy
try this it will work:
#include<stdio.h>
int main()
{
const int i=10;
*(int *)&i=i++;
printf("%d\n",i);
return 0;
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Why is c known as a mother language?
What are structure types in C?
write a c program for swapping two strings using pointer
What is the best organizational structure?
why we wont use '&' sing in aceesing the string using scanf
Why we use void main in c?
How can I convert a number to a string?
What is a file descriptor in c?
What are the functions to open and close file in c language?
Explain what does the format %10.2 mean when included in a printf statement?
What are 'near' and 'far' pointers?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
How do you convert strings to numbers in C?
Can a void pointer point to a function?
What is clrscr in c?