What is Constant in C Language?

Constant in C language?



·       Constant is nothing but a keyword in C which is used as const in C.
·       It is used to make variable constant.

· When we declare variable as constant its value become constant or unchangeable.

·       We can define constant in two ways:-
1.    Const Keyword:-

§  We have to use const keyword before any variable to make it constant.

§  Ex:- const int num=3;
 
2.    #define preprocessor:-

§  Using #define we can also create constant.

§  We will learn about C #define preprocessor in another section.



  • You Can Also Visit Youtube Channel TechGeek-Mayur or click on link given below to get Videos on C Language Tutorial.


  • Thanks for visiting our blog. Please follow our page for more updates.

  • If you have any query regarding any topics just put it on Comment section we will cover that query in detail with solution.

Comments

Popular Posts