Escolar Documentos
Profissional Documentos
Cultura Documentos
Programming languages fall in three broad categories, that is machine assembly and high
level languages.
C language was developed in early 1970s by Dennis Ritchie at Bell Lab to implement the
UNIX Operating System on the PDP-11 manufactured by DEC( Digital Equipment
Corporation)
It was mainly used for writing system programs such as operating systems, compilers,
assemblers, word processor, spreadsheets and games etc.
It is highly structured language. C language programs are easy to understand and follow.
It is some times called mid level language since it combines some feature of low level
language and some of High Level Language.
C language has a small set of reserved words and the basic data types are simply integer,
floating point number and character. It does not have read and write statements like other
languages for performing input/output operations. These operations are performed by
means of functions provided in standard library.
American National Standard Institute (ANSI) introduced the standard version of C
language. Many software developers have adopted ANSI C for writing C compliers
which made C more portable. If the programs are not portable then program written on
one system cannot run on another and the programming efforts and time spent on the old
system would have been wasted.
#include<stdio.h>
void main(void)
{
printf(“Helper Public College Quetta”);
}
The # sign indicates that this is an instruction for the compiler. The <stdio.h> stands for
standard input-output header and the word include informs the C compiler to include the
declarations in the file stdio.h the user’s program.
A C program consists of one or more functions. C uses functions as the building blocks of
its program. A function performs a single well defined task. Every C program must have
the function main() which is the first sections to be executed when the program runs. The
word void before the function main() means that this function does not return a value and
the second void inside the brackets means it does not have any argument.
The body of the function is surrounded by braces ( ) The left brace indicates the start of
the function and right indicates the end of the function.
Printf is the standard output function. The text a semicolon (;)