Any C program only allow us to use Alphabets, Digits and Special characters. C is a Case Sensitive language. That means in c programming
Alphabets
Uppercase
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Lowercase
a
b
c
d
e
f
g
h
l
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Digits
0
1
2
3
4
5
6
7
8
9
Special Character
#
,
<
>
.
|
(
)
;
$
:
%
'
^
-
[
]
-
?
&
{
}
"
"
/
\
*
_
+
Identifiers in C language
What is identifier ? In general, by which we identify anything is an identifier (like my name is an identifier). In C programming an identifier is a name used to identify any user defined item like variable, function. Probably you are thinking what is variable ? let it go now, we will discuss it in the next topic/variables section.
Rules for writing an identifier
An identifier can have both uppercase and lowercase letters, digits and underscores.
First character of an identifier should be an alphabet or underscore. We can’t use any digit in beginning of an identifier.
We can’t use special character in identifier except underscore.
An identifier can’t be any keyword. (we will discuss about keyword here).
Keywords
In C programming some words are already been used in compiler. Keywords are part of the syntax. That’s why keywords are reserved. We can’t use those word as an identifier.
If we can remember our basic c programming code then there we used return which is a keyword. We can’t use return as a identifier.
The following list shows the keyword or simply reserve word in C language.
No comments:
Post a Comment