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
What are the advantages and disadvantages of a heap?
Why c language?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What are types of functions?
Write a program to print fibonacci series using recursion?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
How can my program discover the complete pathname to the executable from which it was invoked?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What is static function in c?
How do shell structures work?
What is fflush() function?
Explain how are portions of a program disabled in demo versions?
Explain what is the difference between #include and #include 'file' ?
What are the back slash character constants or escape sequence charactersavailable in c?