Professional Documents
Culture Documents
International management
Submitted to:
Sir Tasman pasha
Submitted by:
Azhar Hussain
Course:
Mphill accounting & finance
Session:
Spring 2017
Introduction to C-Programming language
#include<stdio.h>
#include<conio.h>
void main()
{
printf("*******************************");
printf("****Muhammad Arslan Ghafoor****");
printf("****Roll no**********40********");
printf("********Welcome*****************");
getch();
}
It will give output like that:
Page 2
Lab manual 1
Introduction to C-Programming language
#include<stdio.h>
#include<conio.h>
void main()
{
printf("*******************************\n");
printf("****Muhammad Arslan Ghafoor****\n");
printf("****Roll no**********40********\n");
printf("********Welcome*****************\n");
getch();
}
the only change in this program is of “\n” it move the curser to the next line in other words it
works like ENTER button.
Then screen will show output like that:
Page 3
Lab manual 1
Introduction to C-Programming language
8 KEYWORDS
Keywords are the words whose meaning has already been explained to the C compiler. Key words
are some reserved words which can never be changed.
For example:
Key word “A” this specific symbol is define its own uniqueness any other symbol will not used to
define “A” so, this is called key word. Likewise A to Z are key words which are specified and not be
change able.
For example:
#include<stdio.h>
#include<conio.h>
void main( )
{
printf(“*****ARSLAN*****”);
getch( );
}
In this program “void” & “include” are key words.
9 ERRORS
Page 4
Lab manual 1
Introduction to C-Programming language
Logical error: logical error is error which cause due to mistake in logic of program. Compiler or
interprator can not catch logical error.
Languages are required for making applications. For making web application there is required web
language and for desktop application there is required desktop languages. Mozilla, Google chrome
are types of web applications while vlc player, games, etc are desktop applications. Web
applications are made in web languages while desktop applications are made in desktop languages.
Script, php are types of web language and c, c++,c#, basic, are types of desktop languages
11 HEADER FILES
Header files are some specified files which are written on the bottom while writing the program.
Example:
#include<stdio.h>
#include<conio.h>
These are header files in which “stdio” means that standard input\output and “conio” means that
cosole input\output. And “.h” means header.
12 SYNTAX
The syntax of the C programming language, the rules governing writing of program in
the language.Every language even human language has its own rules that how to
communicate.Likewise C language has its own rules which must be kept in mind while writing the
program.
High level and low level both are types of language. Difference b\w high level and low level
language is that:
High level language: High level programming laguages is languages program that use languages
or syntax which close to human languages so, it is easy to understanding the languages or syntax
Low level language: while the low languages programming is laguages that close to machine
languages such as assembler languages.
Page 5
Lab manual 1
Introduction to C-Programming language
We generally write a computer program using a high-level language. A high-level language is one
which is understandable by us humans. It contains words and phrases from the English (or other)
language. But a computer does not understand high-level language. It only understands program
written in 0's and 1's in binary, called the machine code. A program written in high-level language
is called a source code. We need to convert the source code into machine code and this is
accomplished my compilers and interpreters. Hence, a compiler or an interpreter is a program that
converts program written in high-level language into machine code understood by the computer.
Interpreter Translates program one statement at a time.
Compiler Scans the entire program and translates it as a whole into machine code.
16 GETCH ( ) USAGE
getch( ) statement is write in b\w or in the end of program to stay the output screen.
If we do not write this statement then output screen will vanished instantly. To hold the output
screen this statement is given. “getch” means that get character after showing the output screen we
will give or any character for vanishing screen otherwise it will be vanished itself.
17 CASE SENSITIVE
And there is difference b\w “A” & “a” called case sensitive. And “C” language is case sensitive
language. We use only lower case in “c” language. If we use uppercase it will give error.
Page 6
Lab manual 1
Introduction to C-Programming language
Page 7
Lab manual 1