Welcome to TCCI-Tririd Computer Coaching Institute.
This tutorial is designed to introduce
basics of C to any new learner.
C
is a general-purpose, imperative computer programming language, supporting structured programming.
We can categorises programming
languages in two, one is higher level and lower level. Computer can understand
only lower level machine language, which is difficult for user to write
programme in that language. In which we write our programs, is higher level
(generally English), Computer can’t understand that language. So, first of all
that language should be converted into lower level language (machine language).
Which our computer can understand.
So, we write programmes, in which
language is called, source code also. It has been converted to machine code by
compiler. This process is called compilation. During compilation source code
has been checked for any syntax error or logical error. If there is no error,
then programme run successfully. After then processor do calculation or
whatever our specific task, which we want as desired result.
There is always pre-processor directory
as a first statement in c programme. One is “stdio.h”. It stands for standard input output header
file. Which includes standard Input and Output functions (scanf and printf) in
c library. When programme compiles, these functions are fetched in programme
from c library. Second is “conio.h”, It stands for Console Input Output. This
directory includes “clrscr()” and “getch()” function. Every C program must have
one special function main (). Main has no return data type. So, always use void
as data type. If you want, you can use in main() also.
But then in programmed you have to include “return 0;” as last statement. This
is starting point of c programmed. Always main function has pair of braces {}.
First {-opening brace call compiler starting of programme execution.
Second}-closing brace call compiler ending of programmed execution. Whatever
our task/operation/function is written between these opening {and} closing
braces. Then each expression statement inside function must end with a
semicolon. Here, one statement is written as a source code, printf
statement. Its function is to display to the computer screen as an output to
user.
Here is simple example of C program.
#include<stdio.h>
#include<conio.h>
Void main ()
{
printf(“Wel
come to TCCI-Tririd computer coaching Institute.”);
}
Output:
Wel come to TCCI-Tririd computer coaching Institute.
This programme just display what we
have written in printf statement.
To learn more contact C language at
TCCI.
For More Information About Basic of C programming at
TCCI, Ahmedabad,
computer
course, programming
course
No comments:
Post a Comment