Constants

Constants variable की तरह ही होते हैं।   लेकिन during the execution of programme,  एक बार define करने के बाद इनकी value कभी change नहीं होती।  





Syntax :-

      • Const Type constant_name;
        • or
        • Type Const constant_name;


    ऊपर दिए हुए syntax में :-


    • 'Const'  = एक keyword/ reserved word है जो कि constant को define करने के लिए use करते हैं। 
    • 'Type'     = यहाँ हमें C compiler को बताना होता है कि हम किस type का constant define कर रहे हैं। 
    • 'Constant_name' = यहाँ हमें constant variable का name देना होता है। 



    Example on Turbo C programming :- 





    Output :-




    Post a Comment

    0 Comments