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 volatile c?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
What is the advantage of c?
Explain what will the preprocessor do for a program?
Can you return null in c?
How can I find out if there are characters available for reading?
What is gets() function?
Is struct oop?
How to declare a variable?
What is the use of a semicolon (;) at the end of every program statement?
How can my program discover the complete pathname to the executable from which it was invoked?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Explain indirection?
What library is sizeof in c?