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 clrscr is used after variable declaration?
What should malloc(0) do?
Is c easy to learn?
write a c program in such a way that if we enter the today date the output should be next day's date.
What is data types?
What is typeof in c?
Explain what are the different file extensions involved when programming in c?
What is the difference between array_name and &array_name?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What is the code for 3 questions and answer check in VisualBasic.Net?
How can you convert integers to binary or hexadecimal?
What is a structure member in c?
how can f be used for both float and double arguments in printf? Are not they different types?
Explain the advantages of using macro in c language?
how do you execute a c program in unix.