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
How can I write a function analogous to scanf?
In C language what is a 'dangling pointer'?
What are the functions to open and close the file in c language?
What is the use of a conditional inclusion statement in C?
What is C language ?
What is #include stdio h?
Write a program to implement queue.
Using which language Test cases are added in .ptu file of RTRT unit testing???
Which is better malloc or calloc?
What does d mean?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
#include
Is it possible to use curly brackets ({}) to enclose single line code in c program?
What are the key features in c programming language?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)