Hi friends, in this article, I tell about some important
points that are used in C language.
The Characters Sets.
C has the following set of characters to use in the C program. These are characters in C language are
grouped into the following categories:
a) Letters: A to Z and a to z
b) Digits: 0 to 9
c)Special Symbols.
Symbols
|
Name
of the symbol
|
,
|
Comma
|
;
|
Semi
colon
|
“
|
Quotation
mark
|
:
|
Colon
|
‘
|
Single
quotation mark
(right
pointed)
|
’
|
Single quotation mark
(left
pointed)
|
?
|
Question
mark
|
!
|
Exclamation
mark
|
(,)
|
Parentheses
|
|
|
Pipe
|
[,]
|
Bracket
|
{,}
|
Braces
|
/
|
Slash
|
\
|
Back
slash
|
#
|
Hash
|
@
|
At the rate of
|
~
|
Tilde
|
%
|
Percent
|
^
|
Carat
|
&
|
Ampersand
|
+
|
Plus
|
-
|
Minus
|
*
|
Asterisk
|
_
|
Underscore
|
<
|
Less
than
|
>
|
Greater
than
|
.
|
Decimal
|
=
|
Equal
to
|
$
|
Dollar
|
\0
|
Null
Character
|
White Spaces: Blank spaces, horizontal tab, Carriage retain, new line, backspace and form feed audible sound (\a).
C tokens:
the basic and the smallest units of the program
are called C tokens. There are 6 types of tokens in the C language.
1)keywords.
2)identifiers.
3)constants.
4)strings.
5)operators.
6)Special Symbols.
1)keywords:
keywords are the sequence of characters (word) whose meaning has already been
explained to the C compiler. Keywords can’t be used as variable names. The
keywords are also called reserved words. These
keywords can be used only for specified purposes. They can’t be
used as programmer-defined identifiers. The keywords are written in lowercase.
the 32 keywords which are the following:
auto
|
double
|
int
|
struct
|
break
|
else
|
long
|
switch
|
case
|
enum
|
register
|
typedef
|
char
|
extern
|
return
|
union
|
const
|
float
|
short
|
unsigned
|
continue
|
for
|
signed
|
void
|
default
|
goto
|
sizeof
|
volatile
|
do
|
if
|
static
|
while
|
2) Identifiers:
Identifiers refer to the name of variable, functions, arrays, structures,
symbolic constants, etc. these are user-defined names and consist of a sequence of
letters and digits with a letter as the first character. Both uppercase and
lowercase letters are allowed but both are considered of a different type. Most
of the identifiers and conventionally declared in lowercase. Underscore
character may also be used and it can be placed in the first position also.
identifiers may be of any reasonable length generally of 8 to 10 characters.
Certain compilers allow longer names up to 63 characters in ASCII. Two
identifiers will be considered to be different if they differ up to 31
characters.
3) Constant: A
constant is a quantity that doesn’t change during the execution of the program.
Constants are divided into two major categories:
a) Primary Constants: Integers, Character, float/real.
b) Secondary constants: Array, pointer, Structure, Union, etc.
4) Strings: A
string is the data type used in programming, such as an integer and floating-point
unit, but is used to represent text rather than numbers. it is comprised of a
set of characters that can also contain spaces and numbers.
5) Operators: Operators are special characters which instruct that compiler to perform
certain mathematical or logical operations on some operands. In a instruction
of C program. Operations are specified by operators while operands can be
constants, variables or expressions.
1 Comments
Aaj wala kuch kuch samaj aaya
ReplyDeleteAb video bahut hi essential ho gya h
Enter your message here