How to access or modify the const variable in c ?

Answer Posted / vignesh1988i

const. variable cannot be modified........ if you declare an
variable as:
const char i=90;
throught the program 'i' cant be modified
but #define macro can replace const.. and that macro can be
modified.... but its disadvantage is it will blindly
substitute the data which is #defined.......

Is This Answer Correct ?    21 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can one function call another?

620


What is scope rule in c?

600


Write a program that accept anumber in words

1246


What are different storage class specifiers in c?

611


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

689






An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

652


What is malloc return c?

593


What is getch c?

845


What is meant by int main ()?

712


What is the best way to comment out a section of code that contains comments?

772


What does #pragma once mean?

679


What does c mean in basketball?

556


When should a type cast not be used?

620


How are structure passing and returning implemented?

588


What are the uses of null pointers?

588