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 are run-time errors?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Why header files are used?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
will u please send me the placement papers to my mail???????????????????
please give me some tips for the placement in the TCS.
Why is c so powerful?
Explain 'bus error'?
what do u mean by Direct access files? then can u explain about Direct Access Files?
What is the difference between array and structure in c?
Explain the advantages and disadvantages of macros.
Can you tell me how to check whether a linked list is circular?
what is uses of .net
p*=(++q)++*--p when p=q=1 while(q<=6)
Why can’t we compare structures?