2. Consists of a set of predefined rules.
These rules form the syntax of that language.
Hence learning a programming language is
nothing but learning of that language.
3. Computer can understand only instructions written
in binary code ( 0 and 1), They do not directly read
or understand a any programming language. And
so a programming language is converted into
binary code by using a special program called
compiler.
A program which translates instructions written in
a programming language into binary code is called
a compiler.
When we write a program in C Language, what we
write is called Source Code.
The compiler’s output is called executable code.
4. C is a programming language developed at
AT&T Bell laboratories around 1972.
It was designed and written by Dennis M.
Ritchie.
C was standardized in 1989 by American
National Standard Institute (ANSI). So it came
to be known as ANSI C.
C is a structured language. It breaks up a
program into small parts known as functions.
5. Flow chart
use to define flow of any program.
symbolic representation of program.
use different symbols.
13. start
end
Insert value of i
Print value of I
is less than
five
Print value of
I is greater
than five
If(i<5)
Declare variable I
as integer
14. Documentation
Symbolic Constant Definition
File Include Section
Global Variable Declaration
Main()
{
Declaration
Executable Statements
}
Function 1 Function 2
Function n….
starting
Section
Compulsory
section for all
C Programs
User Defined
Functions
15. Compile is one type of program to convert
source code into machine level code,
Compiler compile the code of block and
return the error and warning list.
17. #include <stdio.h>
#include <conio.h>
# : is pre possessive directive.
use to include header files before
start the program.
18. Header file is collection of pre define
functions.
Extension of header file is must “.h”.
Header files are located in “INCLUDE” folder
of “TC”.
19. void main()
{
main()
c compile founds main() to start execution of
program.
must declare main function in every program.
20. {
braces use to define starting of coding block.
21. printf(“My First program”);
printf() : use to print any formatted
string in output window of
Turbo c.
header file : stdio.h
( standard input output )
22. getch();
}
getch() use to get 1 character from
keyboard.
} define end of coding block.
23. Compile the source code with.
Alt + F9
Run the program with.
Crtl + F9
24. C language is totally case sensitive language.
All the statements of C language must
terminate with semi colon ( ; )
29. Signed integer
range -32,768 to 32,767
occupy first bit as a sigh bit.
( + / - )
memory space ( 2 bytes )
30. Unsigned integer
range 0 to 65,535
not occupy any bit as sign bit.
memory space ( 2 bytes )
Note : to declare unsigned integer variable
must use unsigned key word before integer.
31. Use to store values with fiction point.
memory space ( 4 bytes) 32 bits
Double 64 bits(8 bytes)
Long double 80 bits(10 bytes)
32. Default unsigned character
8 bits ( 1 byte )
Range : 0 to 255
Signed character
8 bits ( 1 byte )
Range : -128 to 127
33. int a = 10;
printf(“Value of variable a is : %d”,a);
o/p : Value of variable a is : 10
34. %d use for integer values
%f use for float values
%c use for character
%s use for String
%l use for double values
%lf use for long double values
35. Use
scanf() function
Syntax :
scanf(“format character ”, &variable name);
36. int a;
printf(“Enter value of a ”);
scanf(“%d”,&a);
printf(“Value of variable a is : %d”,a);
o/p value of variable a is : 10
Note : assume that we entered 10 from
keyboard.