You are on page 1of 7

Presentation :

International management

Submitted to:
Sir Tasman pasha

Submitted by:
Azhar Hussain
Course:
Mphill accounting & finance

Session:
Spring 2017
Introduction to C-Programming language

7 PRINT THE STATMENT

#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

And if similar program written in that way:

#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

Some mistakes while writing the program cause error.


There are two types of errors:
1-syntax error
2-logical error
Syntax error: syntax error is actually the error which cause due to disobey any rule. When we
break any rule or write something other then specified rules it will cause syntax error.

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.

10 WEB AND DESKTOP LANGUAGES

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.

13 HIGH LEVEL VS LOW LEVEL LANGUAGES

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.

14 HISTORY OF “C” LANGUAGE

C is a programming language developed at AT & T’s Bell

Page 5
Lab manual 1
Introduction to C-Programming language

Laboratories of USA in 1972. It was designed and written by a


man named Dennis Ritchie.

Possibly why C seems so popular is because it is reliable, simple


and easy to use. Moreover, in an industry where newer languages,
tools and technologies emerge and vanish day in and day out, a
language that has survived for more than 3 decades has to be really
good.
An opinion that is often heard today is – “C has been already
superseded by languages like C++, C# and Java.

15 COMPILER VS INTERPRA TOR

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

There are two types of cases


Lower case: “a”, “b” , “c” , etc called lower case. In other words they are also called small
alphabets
Upper case: “A”, “B”, “C”, etc called upper case. In other words they are also called capital
alphabets

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

You might also like