CSE 103 Lab-1
CSE 103 Lab-1
Lab Manual
Course : CSE 103
Credit Title : Structured Programming
Instructor : Dr. Maheen Islam, Associate Professor, CSE Department
Objective
• Familiarizing with computer and windows operating system
• Familiarizing with C language and integrated development environment (IDE)
• Your First C program.
Procedure:
1. Start Code::Blocks by left clicking on the Start button and then go to Programs, in the menu you
should be able to find Code::Blocks, and then click on Code::Blocks and the program should
start.
2. From the File menu select New, and then select Project as shown below.
Page 1 of 9
3. From the New Project dialog window, select Console Application. Then press the Go button.
4. Now Code::Blocks will help you to create your project file with a couple forms. On this first one
you can check the Skip checkbox and then select the Next button.
Page 2 of 9
5. Now select C and then click on the Next button.
6. Now you can give your project a name and you may want to select the Desktop for the location of
where to create the project. Then click on the Next button.
Page 3 of 9
7. Now it will give you some more options, but if the two check boxes are checked then you can just
click the Finish button..
Page 4 of 9
8. Now you should get a screen like below, but hopefully a little bigger.
9. Click on the little plus sign next to the Sources to have it show main, and then click on the main
to have it show you file
10. Before you change anything, the program should be ready to compile and run. You can
select Build from the menu and then Build & Run (or as you can see from the menu you could just
press F9 to do this) to compile and run the program.
Page 5 of 9
11. If there are no problems (and there shouldn't be any), then the program should run something like
this.
An example of a program in C:
#include <stdio.h>
int main( )
{
printf(“Dhaka\tChittagong Khulna Sylhet");
printf(“\n\tBarishal \t\tRangpur");
return 0 ;
}
Page 6 of 9
Output:
Dhaka Chittagong Khulna Sylhet
Barishal Rangpur
Problem 1:
Write a program to print the following in C language.
I live in Dhaka.
Problem 2:
Write a program to print the following in C language.
My Family Information-
Name: Devid
Father: Daud
Mother: Stella
Education Information:
School: Saint Joseph School
College: Mirpur College
University: East West University
Problem 3:
Page 7 of 9
Problem 4:
---------------------------------------------------
---------------------------------------------------
|| Name :-- MD. Al Amin ||
|| House No:-- 45, Street:- Fular Road||
||City:-- Dhaka, Post Code:-- 1217 ||
---------------------------------------------------
---------------------------------------------------
Problem 5:
Write a program to print the following in C language.
*
**
***
****
Problem 6:
Problem 7:
Page 8 of 9
Home Work:
* **** *****
** *** * *
*** ** * *
**** * *****
You have to print the above TEXT using printf and \n only.
Page 9 of 9