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

Difference between constant pointer and pointer to a constant.

846


What is typedef example?

869


What are the 3 types of structures?

798


List some basic data types in c?

788


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

4833


Differentiate between #include<...> and #include '...'

835


What is mean by data types in c?

777


What's the right way to use errno?

877


What is pass by value in c?

815


Why c language?

858


How can I get random integers in a certain range?

815


What is the difference between union and anonymous union?

1067


What is difference between union All statement and Union?

899


What is self-referential structure in c programming?

909


Why doesnt that code work?

810