How to access or modify the const variable in c ?
Answer Posted / varunreddy
a small modification to answer #13
#include<stdio.h>
int main()
{
const int a=10;
*(int *)&a=25
printf("%d\n",a);
return 0;
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
what is the difference between class and unio?
If I have a char * variable pointing to the name of a function ..
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
What is the purpose of void pointer?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Is it possible to initialize a variable at the time it was declared?
If null and 0 are equivalent as null pointer constants, which should I use?
What does emoji p mean?
Which is an example of a structural homology?
Can you add pointers together? Why would you?
int i=10; printf("%d %d %d", i, i=20, i);
How do I use strcmp?
Explain how can I read and write comma-delimited text?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
What is main () in c?