List of C language keywords

#vpsinghrajput


“C has 32 key words”




These are also known as preserve words which are already declared to the C compiler.

Statements and Blocks , List of Escape Sequences

#vpsinghrajput


Statements and Blocks
==================> The line which is terminated with a ( ; ) is known as statement.
In C language ( ;) is known as statement terminator.
Braces { and } are used to group declarations and statements together into a compound statement, or block this is consider as a single statement.

List of Important Escape Sequence:==========================> In C language, these below characters are called as Non- printable characters.
Examaple:-
\n --> new line
\t --> tab space
\a --> beep sound
\b --> back space
\0 --> null space
\r+\l = \n .
etc.....

Primary Datatypes in C language

#vpsinghrajput


Datatype ----- Format String ----- Range
================================================
int (2 bytes)-- --- %d -------- (-32,768 to +32,767 )
float (4 bytes)---- %f -------- (-3.4 E 10^38 to +3.4 E 10^38 )
char (1 byte)----- %c , %s ---- It represents all ASCII values
long (4 bytes)---- %ld -------- (-2,147,483,648 to +2,147,483,647)
double (8 bytes)-- %lf --------- 1.7 E-308 to 1.7E+308
=================================================

Declaration and Initializing Variables

#vpsinghrajput


Variable declaration:
=================== Variable declaration is nothing but declaring type of variable.
Syntax: datatype variable1, variable2, .....;
Example:
int x, y;
float radius, area;
---
Intializing variables at the time of Declaration:
======================================
Example:
int x=10, y=30;
float radius=5.6, height=5.9;
char ch='A';

Definition of Constant and Variable

#vpsinghrajput


Constant:
=========> A constant is a quantity that doesn't change. This quantity can be stored at a location in the memory of the computer.
...
Variable:
==========> A variable can be considered as a name given to the location in memory, where this constant is stored.
Also the contents of the variable can change during program execution.
Ex: x =20
here a variable 'x' is assigned a constant of '20'.
-------
Rules to Declare a variable:
====================>
1. Variable names must starts with a letter or underscore(_) followed by any number of letters, digits or underscore.
2. Upper case is different from lowercase, so the names SAM, sam and Sam specify three different variables.
3. No commas or blank are allowed with in the variable name other than underscore.
4. The variables are defined at the begining of the block. ( and no keywords)

Valid Examples:- si_int, pop_e_83, cost, ..............
Invalid : int, $money, 2x, ............
================================================