Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views4 pages

EEE134 Lab1

This document outlines the first laboratory session for the Computer Programming Laboratory course at Southeast University, focusing on the introduction to the Code::Blocks IDE and writing basic C programs. Students will learn how to create, organize, and debug C programs, along with practical exercises to reinforce these skills. Additionally, a lab report is required, covering topics such as the features, applications, and limitations of C programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

EEE134 Lab1

This document outlines the first laboratory session for the Computer Programming Laboratory course at Southeast University, focusing on the introduction to the Code::Blocks IDE and writing basic C programs. Students will learn how to create, organize, and debug C programs, along with practical exercises to reinforce these skills. Additionally, a lab report is required, covering topics such as the features, applications, and limitations of C programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Southeast University

Department of Electrical and Electronic Engineering


Course Code: EEE134 Course Title: Computer Programming Laboratory
Course Instructor: Md. Asif Hossain

Lab no. 1
[ Introduction to Code::Blocks and The First C Program ]
Objective:
In this laboratory session you will learn:
1. Introducing of IDE.
2. How to create C programs
3. How C programs are organized
4. How to write a basic program to display text on the screen

Code::Blocks is a free, open-source cross-platform IDE (Integrated development environment) which is a software
application that provides comprehensive facilities to computer programmers for software development. An IDE normally
consists of a source code editor, compiler and/or interpreter, build automation tools, and usually a debugger. The purpose
of these notes is to introduce you to this environment and help you learn how to use it as you develop and hone your
programming skills. It will allow you to create and test your programs from one easy to use application.
A program written in a computer language, such as C/C++, is turned into executable using special translator software.
The first translator involved in this process is called a compiler. A compiler is a computer program (or set of programs)
that transforms source code written in a computer language (the source language) into another computer language (the
target language, often having a binary form known as object code). Then, in the case of C/C++, another translator is
involved, called a linker. a linker or link editor is a program that takes one or more objects generated by a compiler and
combines them into a single executable program. The purpose of this instructions is to help the student develop the skills
to organize program coding and develop sound techniques for finding and isolating errors. Here you will learn how to
trace the code step by step, so that it becomes clear where the problem is and why your program does not execute
properly. This is called debugging the program.
Download link of Code::Blocks:
The latest version of code::block is 13.12. You can download the software from the following link:
http://www.codeblocks.org/downloads/26#windows
Click as the following figure shows:
Installation of Code::Blocks:
Just double click the downloaded .exe file to install.
How to use Code::Blocks:
Step 1: After the installation, you can find Code:: Blocks’ shortcut on the desktop or find it on the start menu>All
Programs>Codeblocks> Codeblocks.
Just open the Code::Blocks. You find the following screen:

Step 2: Now click on File>New>Empty file

You will find the following workspace:

Step 3: Save the file. Click on File>Save file


Give a name with the extension .c like first.c. Then press Save.
Step 4: Now write the codes.

Step 5: Now we have to compile and the run the program to see the output of the program. At first Save the code by
clicking File>Save file. Now click on Build> Build and Run.

After Running the program you will find the following output screen (if your program has no error):

If your code has any error, then you will find the error(s) on the following place:
_______________________________________________________________________________
Write a code which will show the following output:

Exercise 2: Modify the example


 Open the file lab1.c
 Add the following line after the printf statement
printf(“\\n means New Line \t”);
printf(“\\t means Tab \n”);
 Save the file (lab2.c)
 Compile and Run the file
 What is displayed on the DOS screen?
Exercise 3:
 Create a new file called lab3.c which prints the following text on the PC monitor:
Hello World
My name is Joe Bloggs
Goodbye World
 Save, Compile and Run the file

Lab Report Submission:

Submit a lab report based on the following questions/topics:

1. What is C programing? Give details features of it.

2. What are the applications where we can use this program?

3. Limitations of C program.

You might also like