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
Why is this loop always executing once?
what is stack , heap ,code segment,and data segment
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
List some of the dynamic data structures in C?
What does int main () mean?
Explain how do you determine a file’s attributes?
Explain what is #line used for?
What are valid operations on pointers?
Which is more efficient, a switch statement or an if else chain?
What is extern keyword in c?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
explain what is a newline escape sequence?
Write a code to generate divisors of an integer?
string reverse using recursion
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function