Professional Documents
Culture Documents
C Language PDF
C Language PDF
And
C Program.
Why C ?
concepts.
Structured programming language.
Developments of other PL requires core C
elements.
Unix, Linux and Windows in C.
Cellular phones and palmtop softwares.
Gaming frameworks.
Hardware devices interaction with max
performance.
Alphabets,
Digits,
Special
Symbols.
Program.
Constants,
Variables,
And
Keywords
Instructions
C Constants.
Primary Constants.
Integer Constants.
Real Constants.
Character Constants.
Secondary Constants.
Array.
Pointer.
Structures and Unions.
Enum.
Integer Constants.
e.g. 426
+756
-588 etc.
Character Constants.
e.g. E
h
=
8
Real Constants.
+3.211e-4
e.g. 488.22
5.6e4
+85.23
-11.20
-32768 to 32767.
float requires 4 bytes to store.
-3.4e38 to 3.4e38.
char requires 1 byte to store.
A.Z and a.z also special symbols.
long int requires 4 bytes to store.
-2147483648 to 2147483647.
double requires 8 bytes to store.
-1.7e308 to 1.7e308.
long double requires 10 bytes to store.
-1.7e4932 to 1.7e4932.
Keywords.
auto
continue
enum
if
signed
typedef
volatile
break
default
extern
long
sizeof
union
near
case
do
float
register
static
unsigned
far
char
double
for
return
struct
void
asm
const
else
goto
short
switch
while
Operators.
Numerial operators.
Logical operators.
Relational operators.
Conditional operators.
Bitwise operators.
Numerical operators.
+
*
/
% =
--------------------------------------------e.g. int a, y = 10, x = 12;
float b;
a = y + 10;
b = x / 2;
a = a b;
Relational operators.
>
<
>= <=
==
!=
Logical operators.
&& ||
Conditional operators.
?
Boolean operators.
&
Hierarchy of operations.
int i;
i = 5 * 6 8 + 9 (43 + 2) /5 5;
i = 30 8 + 9 45/5 5;
i = 30 8 + 9 9 5;
i = 22 + 0 5;
i = 17;
First C Program.
#include<stdio.h>
main()
{
int i = 10, j = 12;
float k, m = 12.6;
k = (i + j) / m;
printf(Input : %d %d %f, i, j, m);
printf(\nOutput : %f , k);
}
Input : 10 12 12.600000
Output : 1.746032
%d integer value.
%f float value.
%c character value
Created By,
Mr. Tushar B Kute,
Lecturer in Information Technology,
K. K. Wagh Polytechnic, Nashik.
tbkute@gmail.com