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
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
Write the Program to reverse a string using pointers.
Explain what is wrong in this statement?
How can I avoid the abort, retry, fail messages?
Difference between Shallow copy and Deep copy?
What is scope rule of function in c?
What is the purpose of the statement: strcat (S2, S1)?
What is a macro, and explain how do you use it?
How a string is stored in c?
What is a pointer and how it is initialized?
Explain what is meant by high-order and low-order bytes?
Explain what is the most efficient way to store flag values?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
List out few of the applications that make use of Multilinked Structures?
What is the scope of an external variable in c?