100% found this document useful (1 vote)
2K views

Lab Report EC201 INTRODUCTION OF PROGRAMMING

The document introduces the steps to write and execute a C program using Microsoft Visual Studio 6.0. It outlines 7 steps: 1) Starting Visual C++, 2) Opening a new file, 3) Giving the file a name, 4) Entering C code, 5) Building and compiling, 6) Linking and errors, 7) Execute program (output). The objective is to expose students to the C programming environment in Visual Studio and produce reports for practical works.

Uploaded by

Fakrul Fajeri
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views

Lab Report EC201 INTRODUCTION OF PROGRAMMING

The document introduces the steps to write and execute a C program using Microsoft Visual Studio 6.0. It outlines 7 steps: 1) Starting Visual C++, 2) Opening a new file, 3) Giving the file a name, 4) Entering C code, 5) Building and compiling, 6) Linking and errors, 7) Execute program (output). The objective is to expose students to the C programming environment in Visual Studio and produce reports for practical works.

Uploaded by

Fakrul Fajeri
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Title : Introduction To C Environment.

0bjective :

1. To introduce student to the Microsoft Visual Studio 6.0 environment.

2. To expose student on how to write a C programme using C++ editor, compiler

And execute a C programme.

3. To explain on how to produce a complete report for C programming practical works.

Equipment ;

1.Computer set.

2.Microsoft Visual C++ Compiler.


Procedure :

Step 1:

Starting Visual C++

a. Click start /programs/programming/Microsoft Visual Studio/Microsoft Visual C++.

b. Cancel the Tip of Day.


Step 2:

Opening a new file on the desktop.

a. Click on menu file/new.

b. Choose a files tab.

c. Highlight C++ source file and click OK.

Review question

i. What is the default name given to the CPP new file?

Answer: CPP1
Step 3:

Giving a file a name

a. Click File /Save As.

b. Save in your own folder.

c. At the file name textbox, erase the existing default name ( Cpp1.cpp).
d. Enter your new file name at the file name textbox.(Lab1a.cpp).

e. Click on Save.

Review question

i. What is the extension for Visual C++ file?

Answer: Cpp1.cpp

ii. Write the status appeared on Microsoft Visual C++ Title bar after you done step 3e.

Answer: lab01.cpp
Step 4;

Enter C code (on your CPP document window)

a. Type the following program.

b. Don’t forget to save title by checking on File/Save or click on icon save.

or
Step 5;

Building and compiling.

a. Click on build/compile file name or press F7.

/
b. Click yes for the message that asking if you want to create a default project workspace. This will
build a .mdp file that contains information of this project.
Step 6 :

Linking and errors

a. Anymore during compiling or linking will be display id the debug window at the bottom of the
screen.

b. Click built /rebuild all to fix errors or press <ctrl>F7.

Review question;

i. What should you do if there is no errors appeared?

Answer: click build.


Step 7;

Execute program (output)

a. Click on built /execute filename or press <ctrl> F5.

/
b. The output program will pop up in a output window.

c. If you have exit the output window, use step 7a to execute your program again.

Review question:

i. What is output of the first program?

Answer: execute program.

You might also like