You are on page 1of 3

Tribhuvan University

Institute Of Engineering
Central Campus, Pulchowk

Assesment Of C Programming

C Programming Assesment Submitted By:


Name: Gyanendra Bikram Ghimire

Roll No: 073/BCE/066

Group: C

Submitted To:
Department Of Electronics and Computer Engineering

Teacher: Rajesh Bhoju

Submission Date: 2073/09/01


1) What is relation among box.c, box.obj, box.exe file?
When we write a program using higher level language, there should be two kinds of
program: the one we typed into the editor window using higher level language is called
source file i.e. box.c file and the machine language kind is called executable file i.e. box.exe
file . When we compiling the program then generating intermediated kind of file called
object file i.e. box.obj file. Object file is required to link with built in library file and possible
other generated object file to make the program executable.

The three files i.e box.c, box.obj, box.exe are related to each other. First, the program
writer (programmer or coder) creates box.c source file in beginning which is then passed
to compiler to producing box.obj object file. Then the box.obj object files are passed to the
linker or loader which includes all necessary library files to produce box.exe executable
file. Here, the function of linker is to combine these file into single executable file. Now,
box.exe is executable file which is then loaded into the memory to be executed by the
user. User can run this executable file anytime to perform his required tasks. So, for a one
program to executed by user he required to create source file, object file and executable
file to run a program. Hence, all three files are required for execution of one program so
they are internally related to each other.

2) Write algorithm and flowchart to find largest among three numbers?


Answer:
Algorithm:
1) Start
2) Declare variable: a,b,c
3) Print “Enter three number”
4) Read three number: a,b,c
5) If a>b then
If a>c then
Print “a is greatest”
else
print “c is greatest”

else
if b>c then
print “b is largest”
else
print “c is greatest”
6)Stop
Fiowchart:

Start

Read number,
a,b,c

is
True a>b? False

is
is b>c?
a>c? False False

Display c as largest

True
True

Display c as largest Display c as largest

Stop

You might also like