# C Character Set and Reserved word Get familiar with letter and word of this language

# C Character Set

It is the fundamental raw material of any language and they are used to represent information. Like natural languages, computer language will also have well defined character set, which is useful to build the programs.

These characters can be combined to form variables. C uses constants, variables, operators, keywords and expressions as building blocks to form a basic C program.

There are 4 types of characters in C.

  1. Alphabets

Lower case Letters: a,b,c,……….,y,z.

Upper Case Letters: A,B,C,………….,Y,Z.

  1. Digits

ex.0,1,2,3,4,5,6,7,8,9.

  1. Special Characters
~ tilde

%percent sign

| vertical bar

@ at symbol

+ plus sign

< less than

& ampersand

$ dollar sign

* asterisk \ back slash ,etc.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  1. White space Characters.
\b blank space

\t horizontal tab

\v vertical tab

\r carriage return

\f form feed

\n new line

\\ Back slash

\’ Single quote

\" Double quote

\? Question mark

\0 Null

\a Alarm (Audible Note)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# Keywords – Reserved Words

In C, we have 32 keywords, which have their predefined meaning and cannot be used as a variable name. These words are also known as “reserved words”. It is good practice to avoid using these keywords as variable name.

int, float, char, double, long – These are the data types and used during variable declaration.

auto, signed, const, extern, register, unsigned – defines a variable.

enum – Set of constants.

volatile

void – One of the return type.

return – This keyword is used for returning a value.

if, else, switch, case, default – Used for decision control programming structure.

break – Used with any loop OR switch case.

for, while, do – types of loop structures in C.

goto – Used for redirecting the flow of execution.

continue – It is generally used with for, while and do while loops, when compiler encounters this statement it performs the next iteration of the loop, skipping rest of the statements of current iteration.

sizeof – It is used to know the size.

struct, typedef – Both of these keywords used in structures (Grouping of data types in a single record).

union – It is a collection of variables, which shares the same memory location and memory storage.

(adsbygoogle = window.adsbygoogle || []).push({});