C Programming Constants, Variables and Keywords

A constant, Variable or a keyword in C programming can be formed from any combination of Alphabets, Digits and Special Symbols. A constant in C programming is an entity whose value does not change throughout the program execution.

A variable in C programming is an entity whose value keeps on changing throughout the program execution. However, it’s not a rule that the value of the variable will change. A variable value might remain same throughout the C program execution. However, the main difference between variable and constant is that we can’t change the value of constant in between the program, but we can change the value of the variable during C program execution.

Let us take an example of C Programming

We define a variable named x in a program, let us say x=3.
After some time during execution, we change the value of x to 6. Now, x = 6.
Here value of x is getting changed. But the value of 3 and 6 will never change. Hence, x is called a variable and 3 is called a constant.

Keywords in C programming are the words whose meaning has already been explained to the C compiler. The keyword cannot be used as the variable name. If we try to do so we are trying to assign new meaning to the keyword. The keywords are also known as β€˜Reserved words’.

E.g.: for, if, static, while, do, break etc.

This C tutorial is brought you by LearnCOnline.com

You may also like...

51 Responses

  1. Anonymous says:

    cool stuff ! thanks πŸ™‚

  2. THANKS. FOR THIS TUTORIAL KEPPS GOING ON

  3. Anonymous says:

    Just a tip. The tutorial looks fine, but you should add [NEXT] and [PREV] buttons, so that one doesn’t have to hunt next from the sidebar.

  4. krishna says:

    it was very helpful…

  5. articlehack says:

    supper stuff.. keep reading guys….
    really useful πŸ™‚

  6. LearnCOnline says:

    Thanks alot everyone for your valuable comments and inputs…

  7. Anonymous says:

    very useful to every one..

  8. Anonymous says:

    gud information….

    πŸ™‚

  9. Anonymous says:

    thanks

  10. Jiyaa.. says:

    Thank you for making It so easy to learn C.

  11. Anonymous says:

    thanks it is gonna helpful…

  12. Anonymous says:

    good nd helpful

  13. Anonymous says:

    Hi this m first time learning to take interest in learning c and these 2 articles have been helpful. still to continue my journey thru the next artciles

  14. anonymous says:

    very nice superb awesome boss i have completed my engg but in engg too nobody has thougth me like this thankkkkkkkkkkkkkkkkkkkkkkkkkkkk u veryyyyyyyyyyyyyyyyyyyyyyyyyy much…………………

  15. Anonymous says:

    Very clear writing style – thanks kindly: I need this site! Dave

  16. Anonymous says:

    Thanks for eveything….

  17. Anonymous says:

    Thanks a million

  18. thank you verrrrrrrrry much

  19. sadik says:

    cool stuff just love it, thanks

  20. Anonymous says:

    Nice way of writing, where we can easy to under stand our difficult problems, Thank You.

  21. Anonymous says:

    it is the easy way to learn c orogramming of this websites

  22. Anonymous says:

    its a sad thing i ha finished my grad in IT bt doent kw much of it..bt dis site is teachin me again with clear concepts step by step..really thnkfull..:)

  23. Anonymous says:

    today only i cleared tat diff b/w the abov two……
    tnx for sharing…..

  24. thank you. Will do my best so this tuorial wont go in vain . That means i wil lstart learn c rightaway now . πŸ˜€

  25. Anonymous says:

    How do we declare variables of our own in respect to the programme what we get?

  26. G8 and easy.Tnx πŸ˜€

  27. Anonymous says:

    Very Helpful Thanks.

  28. Anonymous says:

    great!!1

  29. Anonymous says:

    great helful … Thanks

  30. Anonymous says:

    Please provide next and prev options :/

  31. LearnCOnline says:

    Thank you everyone for the wonderful comments. I hope this website is helping every one out there.

    If you like this website, kindly share it with everyone.

    Thanks,
    LearnCOnline Team

  32. Anonymous says:

    very help ful thanks

  33. Best says:

    Nice one….but I have to go to the side bar to continue ..well I hope you could update it. It’s a nice site, didn’t expect this

  34. Anonymous says:

    very helpful

  35. Anonymous says:

    cool

  36. Anonymous says:

    thnks for ur support keep going on

  37. Rajasekhar reddy Poonuru says:

    thank you dude its simple yet very effective

  38. Anonymous says:

    Very nice Tutorial to begin the Introduction to Programming

  39. Vicky says:

    Excellent site you have here.. It’s difficult to find
    excellent writing like yours nowadays. I honestly appreciate people like you!
    Take care!!

  40. Vishal13 says:

    Dear Sir,

    Good Day, I am a student of the MCA. I am completed this program throughout the distance education. Because I have not interest in the regular education. Now a days there no regularity in the lectures. I really completed programming education online.
    I searched “Learn C” website, and I feel that Now I will complete my aim in my life. This is very good site.
    Thank you,
    Yours faithfully,
    vsp

  41. Micheal Nguy?n says:

    Thanks you! I started learn C, I found your web and I think it verry helpful.

  42. madhulika says:

    good

  43. kelvin says:

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *