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
What is c language used for?
Explain what is the stack?
What are the restrictions of a modulus operator?
Which header file is used for clrscr?
What are qualifiers in c?
How the c program is executed?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
How will you delete a node in DLL?
What is a double c?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What is abstract data structure in c?
Why doesnt this code work?
In C language what is a 'dangling pointer'?
What is a program flowchart?