Escolar Documentos
Profissional Documentos
Cultura Documentos
Developed between
1969 and 1973 along
with Unix
Due mostly to Dennis
Ritchie
Designed for systems
programming
Copyright © 2001 Stephen A. Edwards All rights reserved
While writing C program some rules are to be kept in mind
2. Character char
Double
4. precision double
floating point
5. Void void
Integer Type:
Integers are whole numbers with a machine dependent
range of values. A good programming language as to
support the programmer by giving a control on a range of
numbers and storage space. C has 3 classes of integer storage
namely short int, int and long int. All of these data types
have signed and unsigned forms. A short int requires half
the space than normal integer values. Unsigned numbers are
always positive and consume all the bits for the magnitude
of the number. The long and unsigned integers are used to
declare a longer range of values.
Void Type:
y = Name
e = Initial value
Copyright © 2001 Stephen A. Edwards All rights reserved
Keywords:
Data type Keyword Equivalent
Character char
Unsigned Character unsigned char
Signed Character signed char
Signed Integer signed int (or) int
Signed Short Integer signed short int (or) short int (or) short
Signed Long Integer signed long int (or) long int (or) long
Un Signed Integer unsigned int (or) unsigned
Un Signed Short Integer unsigned short int (or) unsigned short
Un Signed Long Integer unsigned long int (or) unsigned long
Floating Point float
Double Precision Floating Point double
Extended Double Precision Floating Point long double
Operator Meaning Operator Meaning
+ Add > Greater Then
- Sub < Lesser Then
* Multiplication == Equal to
/ Division != Not Equal to
Copyright © 2001 Stephen A. Edwards All rights reserved
Functions:
main ():
The first line of any program of ‘c’ always begins with the
function name main (). main () is the special name indicates the
begging of ‘c’ program.
printf :
printf statement is used to make the compiler display the
words / sentences on the screen as given by the user. The word
or sentences given with in the “” will be displayed exactly.
getchar():
To write one word, character etc.
putchar():
# include <stdio.h>
#: It will start the compiler.
include: Compiler
Header File:
# include <conio.h>
This statement is used to include constant input output header
file.