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
How are Structure passing and returning implemented by the complier?
Explain what is meant by high-order and low-order bytes?
What is pass by reference in c?
What is a good data structure to use for storing lines of text?
What is difference between stdio h and conio h?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
If you know then define #pragma?
Is anything faster than c?
What is a header file?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
How can you convert integers to binary or hexadecimal?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
What is the use of getchar functions?
What is the difference between struct and typedef struct in c?
Why doesnt long int work?