0% found this document useful (0 votes)
9 views9 pages

CSE 103 Lab-1

Uploaded by

amivalo45rt
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)
9 views9 pages

CSE 103 Lab-1

Uploaded by

amivalo45rt
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/ 9

East West University

Department of Computer Science & Engineering


Plot No-A/2, Main Road, Jahurul Islam City, Aftabnagar, Dhaka-1219

Lab Manual
Course : CSE 103
Credit Title : Structured Programming
Instructor : Dr. Maheen Islam, Associate Professor, CSE Department

Lab-1: Introduction to C Programming

Objective
• Familiarizing with computer and windows operating system
• Familiarizing with C language and integrated development environment (IDE)
• Your First C program.

Procedure:

Instructions for starting a new project:

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.

There are six divisions in Bangladesh


Dhaka
Chittagong
Rajshahi
Khulna
Sylhet
Bangladesh

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:

Write a program to print the following in C language.

First Line: Your name


Second Line: House no#, Apt#
Third Line: Post code#, City
Forth Line: Country name

Page 7 of 9
Problem 4:

Write a program to print the following in C language.

---------------------------------------------------
---------------------------------------------------
|| 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:

Write a program to print the following in C language.


5 * 1 =5
5 * 2 =10
5 * 3 =15
5 * 4 =20
5 * 5 =25
5 * 6 =30
5 * 7 =35
5 * 8 =40
5 * 9 =45
5 * 10 =50

Problem 7:

Write a program to print the following in C language.


----------- --------
| | | |
| | >>-------------------> | |
----------- ---------

Page 8 of 9
Home Work:

Hello World Hello H


World e
l
l
o

* **** *****
** *** * *
*** ** * *
**** * *****

* * **** **** ****


*** *** * * *
***** ***** * **** ****
* * * * *
* * **** **** ****
* *
* *
* *****
***
*

You have to print the above TEXT using printf and \n only.

Page 9 of 9

You might also like