Click here to Skip to main content
15,906,341 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what is the difference between standard identifier and keyword in c language
Posted

In short:
A standard identifier is word that have a specific meaning and user can re-define it. printf and scanf are standard identifiers.(Refer: http://quizlet.com/3199149/standard-identifiers-flash-cards/[^]).
Keywords are words that have special meaning to the C compiler.See list of keywords:
http://msdn.microsoft.com/en-us/library/befeaky0.aspx[^]
Also see..
Why the concept of standard identifier is used in programming language C ?[^]
 
Share this answer
 
v3
Comments
nv3 2-Sep-13 15:33pm    
Quote: "A standard identifier is a key-word that defines a type.char, int, and float are some of the standard identifiers." -- are you sure? These are all keywords and not identifiers.

As far as the C++ standard goes there is no such thing as a "standard identifier". Probably, your teacher is informally referring to identifiers that are used in the standard library. "char", "int", "float" are all keywords, as "auto", "break", "case" are. (See section "2.12 Keywords" and table 4 in the 2012 C++ Standard draft.)

And, by the way, keywords are also identifiers, just special ones that should not be used to name things in your program. So, strictly speaking, the question in itself is a little misleading and doesn't use correct terminology.
ridoy 2-Sep-13 16:25pm    
Thanks for your info,i do some more study over it,see edited answer.
[no name] 2-Sep-13 22:06pm    
A good answer - a virtual 5. Actually the term "standard identifier" is very misleading as it is not actually in the Standard. To suggest just printf and scanf is not rigorous. Because there is no definition how do we exclude NULL and main for example.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900