What are Keywords and Identifiers in C Language

14:21


Under this I’m gonna explain you all about the obvious topic in all programming languages. These things are very important to understand the basics of any programming language and also to understand what terms will use in that language.


The topic is all about Keywords and Identifiers used in C language. First, I would like to explain what the definition says about Keywords and Identifiers then I’ll go deep in that.


Keywords:

These are the words or terms used in C programming language, or we can say the terms set by default in C language compiler. The terms used in syntax of each program of C language.

Such as: - printf, scanf, int, etc.

So, C language has its own set of reserved terms as Keywords.

Each programming language has restrictions that, programs can’t use those Keywords as names for other things (such as: variables name, functions name etc).

The Keywords reserved in C language are all in lowercase letters and we have to use them as it is given by compiler.

The meanings of Keywords are already defined in C libraries we can’t change or override their meanings.

Examples of Keywords used in standard C programming language are: -

C_programming_language_keyword_examples_finallygot_com


So, like these there are many more Keywords in C language and we can use any of them as per our requirement but we can’t use them for our variable names, function names or other overriding use.


Identifiers: -

Identifiers mean what we use to identify anything in our program. In C language Identifiers are the user-defined words or terms used for identifying components in our programs. Such as, we use names for variables and functions in our programs then, these names are the Identifiers for the program or when we declare structures, enums, unions in C language programs we have to give them labels or tags so, these tags and labels are Identifiers for the program.

We can make Identifiers with some rules:

Identifiers could have 52 uppercase and lowercase alphabetic characters, 10 digits, and ‘_’ underscore.

The restriction is only that, we can make Identifiers only by starting with alphabetic character.

There is no restriction on length of Identifiers but, for the safety of portability of program we should restrict Identifiers in C language up to 31 characters.

Identifiers are case sensitive. i.e; word and WORD are considered different.

No special characters, such as semicolon, period, blank space, slash or comma are allowed for Identifiers.


example_Identifier_Keyword_finallygot_com

You Might Also Like

2 comments

  1. Akash is good in Coding . He always tries to solve problems in a simple sober way. He is very passionate to do complex programming and solving things in effective manner.

    ReplyDelete
    Replies
    1. Thanks Vikas you liked my blog, it's my pleasure to hear from your side.

      Delete

If you have any questions or suggestions, you are free to ask, i will appreciate that and, i will try my best...

Google Ads