How to access or modify the const variable in c ?
Answer Posted / sri harsha s
Its compiler dependant.
Using pointer you can modify the content of a 'const'
variable. It works in gcc.. you will get the following
warning when you compile that program.
warning: initialization discards qualifiers from pointer
target type.
I am not sure about turbo c++.
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
How can I swap two values without using a temporary?
p*=(++q)++*--p when p=q=1 while(q<=6)
What is meant by realloc()?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
Difference between pass by reference and pass by value?
When the macros gets expanded?
what value is returned to operating system after program execution?
Does * p ++ increment p or what it points to?
What is structure packing in c?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What is a program?
Do you know null pointer?
When should a type cast be used?
What is meant by keywords in c?
Tell me can the size of an array be declared at runtime?