32
Laboratory Manual B. Sc. (Hons.) Computer Application I Semester Laboratory Course I: CCB 1P1 Department of Computer Science Aligarh Muslim University, Aligarh

Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

  • Upload
    trandat

  • View
    226

  • Download
    5

Embed Size (px)

Citation preview

Page 1: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

Laboratory Manual B. Sc. (Hons.) Computer Application

I Semester

Laboratory Course–I: CCB – 1P1

Department of Computer Science Aligarh Muslim University, Aligarh

Page 2: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 2

AM

U

AM

U

AM

U

CS

D

Credits

Lab Manual Design Committee:

Prof. Mohammad Ubaidullah Bokhari

Dr. Arman Rasool Faridi

Dr. Faisal Anwar

Dr. Aasim Zafar (Convener)

The Committee thankfully acknowledges the efforts and contributions

of the following teachers:

Mr. Sunil Kumar Sharma

Mr. Md. Naved Iqbal

Mr. Imshad Ahmad Khan

Design & Compilation:

Mr. Sunil Kumar Sharma

First Edition: July 2017

Approved by BoS, Dated– 31/07/2017

Department of Computer Science, A.M.U., Aligarh, (U.P.), India

Page 3: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 3

AM

U

AM

U

AM

U

CS

D

Rules and Regulations

Students are required to strictly adhere to the following rules.

The students must complete the weekly activities/assignments

well in time (i.e., within the same week).

The students must maintain the Lab File of their completed

activities/assignments in the prescribed format (Appendix-1).

The students must get the completed weekly

activities/assignments checked and signed by the concerned

teachers in the Lab in the immediate succeeding week. Failing

which the activities/assignments for that week will be treated as

incomplete.

At least TEN (10) such timely completed and duly signed weekly

activities/assignments are compulsory, failing which students will

not be allowed to appear in the final Lab Examination.

Page 4: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 4

AM

U

AM

U

AM

U

CS

D

APPENDIX-1

Template for the Index of Lab File

S.

No.

ACTIVITY &

ASSIGNMENT

DATE OF

SUBMISSION

SIGNATURE

OF THE

TEACHER

REMARKS

1

WE

EK

#1

AC

TIV

ITY

1#

2#

3#

4#

AS

SIG

NM

EN

T 1#

2#

3#

4#

Note: The students should use Header and Footer mentioning their roll no. & name in footer and page no in header.

Page 5: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 5

AM

U

AM

U

AM

U

CS

D

WEEK #1

OBJECTIVES

To learn using MS-Word. To learn the practical use of MS-Word tool. To learn the practical use of writing skills,

formatting, Word Art, page layout, picture.

OUTCOMES

After completing this, the students would be able to edit, format (bullet, size, colour, underline etc) document, use Word Art, pagination, inserting pictures, using subscript, superscript, Auto sum and applying formula etc.

Type the passage below as it is. Use font size 12.

What is a Browser?

A browser is a computer program that resides on your computer enabling you to use

the computer to view WWW documents and access the Internet taking advantage of

text formatting, hypertext links, images, sounds, motion, blogs, and other features.

Firefox and Internet Explorer are currently the leading "graphical browsers" in the

world (meaning they facilitate the viewing of graphics such as images and video

and more). There are other browsers (e.g., Mozilla, Safari, Opera). Most offer many

of the same features and can be successfully used to retrieve documents and activate

many kinds of programs.

Browsers all rely on "plug-ins" to handle the fancier files you find on the Web.

Plug-ins is sub-programs stored within a browser or elsewhere in your computer

especially to support special types of files you may click on. If you click on a link,

and your computer does not currently have the plug-in needed for the file you

clicked on, you are usually prompted with an opportunity to get the plug-in. Most

plug-ins is free and easy and safe to install on your computer; follow the

instructions you are given.

The main way in which browsers differ is in the convenience features they offer for

navigating and managing the Web and all the URLs you may want to keep track of.

Netscape and Internet Explorer both offer the ability to e-mail documents,

download them to diskette, print them, and keep track of where you've been and

sites you want to "bookmark" or "Add to Favourites" (Microsoft's name bookmarks).

a) Save the document as browser.

LAB – 1-2-3 A

ct

ivit

y

Page 6: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 6

AM

U

AM

U

AM

U

CS

D

b) Change the case of the main heading to Title Case, Font size 16, double

underline & centre it.

c) Put a border right round the passage & not the page.

d) Justify all the paragraphs excluding the main heading.

e) Change the font type of paragraph 2 to Bookman Old Style, font size 14.

f) Divide the passage into 2 columns with a line between.

g) Drop cap all the paragraphs in your document excluding the headings.

h) Change the line spacing of the entire document to 1.5 lines.

i) Save the document as browser2.

1# Create a document in Word on a topic of Scientific Research life of APJ

Abdul Kalam. Format the document with various fonts (minimum 12,

maximum 15) and margins (minimum 2, maximum 4). The document

should include:

a) A bulleted or numbered list

b) A table containing Research element.

c) A picture of lion using clip art gallery

d) An example of word art

e) A header with student(your) name & date

f) A footer with pagination

2# Insert following tables in your document

Organic Compound Molecular Formula

Methane CH4

Ethane C2H6

Propane C3H8

Butane C4H10

Symbol Electronic Configuration

H 1s1

He 1s2

Li [He] 2s1

Be [He] 2s2

3# Create a table in word as shown below:

Roll No Name Marks in

Physics

Marks in

Chemistry Total Marks

1 Sakshi 80 70

2 Rohit 70 80

3 Amit 60 50

4 Rakesh 40 60

5 Komal 30 70

6 Garima 80 80

As

sig

nm

en

t

Page 7: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 7

AM

U

AM

U

AM

U

CS

D

Do the following:

(a) In the total marks column, entries should be calculated using

formulas and it is the sum of marks in physics and marks in

chemistry.

(b) Insert a new row at the end of the table and also find grand total

using formula.

(c) Sort the table based on total marks.

(d) The date and heading should be center aligned.

(e) Heading should be in bold and underlined.

Page 8: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 8

AM

U

AM

U

AM

U

CS

D

WEEK #2

OBJECTIVES

To learn the practical use of MS-Word tool. To learn the practical use of flowchart tool,

hyperlink, mail merge, and macro.

OUTCOMES

After completing this, the students would be able to use flowchart tool, hyperlink (one page or document to another), to make table, mail merge(document or letter many person), and macro for real life.

1# Create given table then connect Website address/document.

(Document- make new document related to given table.

College/ University Website Address/document

Harvard University http://www.harvard.edu

Aligrah Muslim University amu.doc

Jamia Millia Islamia Jmi.doc

Columbia University http://www.columbia.edu

Banaras Hindu University bhu.doc

LAB – 4-5-6 A

ct

ivit

y

Page 9: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 9

AM

U

AM

U

AM

U

CS

D

2#

To

<<Name>>

<<Address>>

Dear <<Name>>

You are called for an interview on the <<Date>>at 9:00 A.M with

your original documents

Yours Sincerely

ABC Limited

Phase –7

Mohali

Enclosure: Resume (the format given below).

Format of Resume

Name :

Father‟s Name :

Date of Birth :

Age :

Address :

Educational Qualification :

Sr. No. Qualification Board/University Percentage

Work Experience :

Technical Skills :

Personal Skills :

Hobbies :

Dated:…………………. Signature

i) Save the document as “Letter.doc.”

ii) Send the document to 3 recipients using Mail merge. (Use 3

different addresses)

iii) Define a Macro „Decorate‟ which makes the text bold, Red

in color and italic, font size Assign a shortcut key Alt + Z to

this macro.

iv) Close the document.

Ac

tiv

ity

Page 10: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 10

AM

U

AM

U

AM

U

CS

D

Draw the following flowchart using drawing tools in your word

processing program, or any other package you are familiar with. Use

font type Times New Roman & font size 11 for text inside the shapes.

PROCEDURE FOR HYPOTHESIS TESTING

Formulation of the Hypothesis

Identification of the Distribution

Determining Rejection & Acceptance Region

Calculation of test statistics from data collected

Make a

Statistical

Decision Do not reject

the null

hypothesis

Reject the null

hypothesis

Conclude null hypothesis

may be true

Conclude Alternative

hypothesis may be true

As

sig

nm

en

t

Page 11: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 11

AM

U

AM

U

AM

U

CS

D

WEEK #3

OBJECTIVES

To learn the MS-Power Point. To learn the practical use of MS-Power Point.

OUTCOMES

After completing this, the students would be able to make PowerPoint presentation, to make greeting card invitation card etc.

1# Design an Identity card.

2# Design a poster inviting all students of your department to the IT

Fest.

3# Create a 5-slide presentation on any topic. Use Images, Graphs,

Chart, Tables, Animation, Time, Bullets, Transition, Sound,

Hyperlink, Background template, Header and Footer.

Design a presentation on your Ideal person.

LAB – 7-8-9

Ac

tiv

ity

A

ss

ign

me

nt

Page 12: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 12

AM

U

AM

U

AM

U

CS

D

WEEK #4

OBJECTIVES

To learn the MS-Excel. To learn the practical use of MS-Excel. To learn the practical use of formatting,

mathematical tools, data entries etc.

OUTCOMES

After completing this, the students would be able to use entries data, formatting data(bullet, size, colour, underline etc) and mathematical calculation (sum, division, percentages etc)

1# Create a spreadsheet with the following entries:

➦ B2 = CHICKEN INN ➦ B5 = 3

➦ A4 = FOOD ITEM ➦ B6 = 1

➦ A5 = PORTION CHIPS ➦ B7 = 1

➦ A6 = SADZA & STEW ➦ B8 = 2

➦ A7 = RICE & CHICKEN ➦ B9 = 3

➦ A8 = HAMBURGER ➦ C4 = UNIT COST

➦ A9 = SOFT DRINKS ➦ C5 = $135.00

➦ C10 = SUB TOTAL ➦ C6 = $180.00

➦ C11 = SUB TAX @ 15% ➦ C7 = $200.00

➦ C12 = TOTAL COST ➦ C8 = $170.50

➦ C9 = $65.00

➦ D4 = COST

➦ B4 = QUANTITY

a) PERFORM THE FOLLOWING:

i) Make B2 bold, underlined and size 16.

ii) Make all headings, i.e. A4 – D4, bold.

iii) Put borders on all entries of the sheet.

iv) Save document as Qn2data and print it.

b) Input the formulae for the cost price of each item D5 – D9

c) Input the formulae for the calculated amounts for subtotals, sales

tax and total cost in D10 – D12 respectively.

d) Create the Pie Graph for the Food Item and Quantity

LAB – 10-11-12

Ac

tiv

ity

Page 13: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 13

AM

U

AM

U

AM

U

CS

D

Columns. The pie chart should have an appropriate title,

legend, and each portion should show the percentage occupied

by each item.

e) Save the document as Qn2chicken and print it.

f) Show formulas you have used in a new sheet and save it as

formulas.

2# Create the following worksheet and save the workbook as

WAGES.XLS. Apply formula to calculate the blank entries.

Name Monthly

(basic) Rs

HRA

(10%

of

basic)

DA

Rs

Total

salary

Rs

Bonus

Rs

Total

Rs

Increase

(%)

Rs

A 5000 10 450 2000

B 8000 07 475 2040

C 6000 12 500 2030

D 6500 09 425 1800

E 7000 08 515 1850

F 9500 11 460 1900

G 7500 10 525 2060

H 9000 07 450 3000

1# Create the following worksheets and save the worksheets with the

name “Basic Salary” and “Salary”.

Sheet 1: Basic Salary Sheet

Name Monthly

(basic) Rs

HRA

(10% of

basic)

DA

Rs

Total

salary

Rs

A 5000 10 450

B 8000 07 475

C 6000 12 500

D 6500 09 425

E 7000 08 515

F 9500 11 460

G 7500 10 525

H 9000 07 450

Ac

tiv

ity

A

ss

ign

me

nt

Page 14: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 14

AM

U

AM

U

AM

U

CS

D

Sheet 2: Salary Sheet

Name Bonus

Rs

Total

Rs

Increase

(%)

Rs

A 2000

B 2040

C 2030

D 1800

E 1850

F 1900

G 2060

H 3000

a) In Basic Salary sheet, apply the formula to calculate the total

salary of employee.

b) In salary Sheet, apply the referenced formula to calculate blank

entries.

2# Use a new workbook & construct a worksheet with the data given &

save it as LYONS

LYONS INC

Orange JUICE Sales

PRODUCT COST

PRICE

PER

LITRE

MARK

UP

PER

ITEM

35%

SELLING

PRICE

LITRES

SOLD

TOTAL

INCOME

PROFIT

Cascade 3.75 234

Quench 3.65 345

Xtra 4.25 456

Sun Splash 1.50 123

House Brand 1.50 245

TOTAL

HIGHEST

LOWEST

Instructions

Markup = Cost price/Litre x 35%

Selling price= Cost price/Litre + Mark up

Total income= Litres sold x Selling Price

Profit = Total income – (Cost price/Litre x Litres sold)

As

sig

nm

en

t

Page 15: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 15

AM

U

AM

U

AM

U

CS

D

a) The MARKUP % (35%) must be inserted in a separate cell under the

heading. USE IT as an absolute cell reference in the formula to calculate the

markup per item.

b) Calculate the mark up for each item.

c) Calculate the selling price for each item.

d) Calculate the Total Income for each item.

e) Calculate the profit for each item.

f) Format the column LITRES SOLD to display the number of litres as

integers. The rest of the worksheet must be formatted to display two

decimals.

g) Use statistical functions to calculate the:

AVERAGE

HIGHEST (MAX)

LOWEST (MIN) for Selling Price column up to Profit Column.

h) Show all formulas you have used in a new sheet. Adjust the column width so

that the formulae are displayed in full and the sheets fits into one side of A4

landscape format and save it as formulas.

i) Under the worksheet Create a pie chart titled PRODUCT COST PER UNIT

for Product & Cost price per Litre columns. Data labels indicating

percentages should be displayed.

j) Put borders neatly on the on the work sheet & save it as LYONS2.

3# Please set up a spreadsheet using the following information. Do not put any

lines or borders on it yet.

Names Weight

Weight

plums Weight

Total

weight

peaches oranges

80Linda 100 50 0

73Joseph 34 212 21

01Rufaro 25 25 33

78Simbai 164 167 74

85Langton 290 0 3

i. Save it as Qn-fruits1.

ii. Use the Sum formula to calculate the Total weight (kg) of fruit packed

by each worker.

iii. Format all the numbers as integer (2 decimal places).

iv. Separate employee names & their payroll numbers, by inserting 2

columns after the Names column & insert the headings Employees &

Payroll Number. Enter the information into the 2 columns. (See

example below).

Employees Payroll Number

Linda 80

Joseph 34

Etc Etc

v. Center align the Payroll Number heading & the numbers in the column.

vi. Delete the Names column

As

sig

nm

en

t

Page 16: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 16

AM

U

AM

U

AM

U

CS

D

vii. Add a title WEEKLY PRODUCTION FIGURES in bold, font size 16

above the spreadsheet.

viii. Add rows at the bottom of the worksheet and label them AVERAGE,

MAXIMUM & MINIMUM.

ix. Calculate the average, maximum & minimum values for the columns

containing weights only.

x. Add shading to the column headings and borderlines to the full table.

(Include the column headings but not the title in the border).

xi. Set up the spreadsheet ready for printing in landscape format.

xii. Save the worksheet as Qn-fruit2.

xiii. Create a pie chart titled (EMPLOYEE PAYROLL NUMBERS) for the

Employees & Payroll Number columns only. Do not show a legend on

your chart. Data labels indicating percentages should be displayed.

Display the chart as a new sheet & print it.

xiv. Change the spreadsheet to display formulae you have used. Adjust the

column width so that the formulae are displayed in full and the sheets fit

into one side of A4 landscape format. Save the worksheet as formulas in

landscape format.

Page 17: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 17

AM

U

AM

U

AM

U

CS

D

WEEK #5

OBJECTIVES

To learn the practical use of day calculation formulae, graph, freeze pane and conditional formatting in MS-Excel.

OUTCOMES

After completing this, the students would be able to use how to calculate days between periods, Graph, Conditional formatting, quickest way to make series, to make scorecard.

1# Create the following worksheet and save the workbook

asWAGES.XLS.

A B C D E

1 PACE COMPUTERS (ATC CEDTI, Govt. Of India)

2 Payroll for employees (Temporary)

3 Today‟s Date 26-Aug-09

4 Pay Rate 95

5

6

Worker‟s

Name Hired on

7 Kushagra 3/3/09

8 Pradeep 3/3/09

9 Puneet 3/6/09

10 Rajiv 3/8309

11 Surbhi 3/2/09

12 Aditi 3/13/09

i. Find out the number of days each worker has worked, by subtracting

date on which worker was hired from today‟s date.

ii. Calculate Gross wages for each worker. The gross wages can be

calculated by using the following formula: Gross wages = no. of

days worked * Pay Rate

Ac

tiv

ity

LAB – 13-14-15

Page 18: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 18

AM

U

AM

U

AM

U

CS

D

2# What would be the steps to the quickest way of creating the

following series in Ms-Excel?

i) 101, 102, 103, …….. 112

ii) MONDAY, TUESDAY,…………………… SUNDAY

iii) 105, 110, 115,…… 160

1# Prepare a Pie chart and Bar Graph based on the following data.

Year Production in rice(ton)

2001 500

2003 525

2005 417

2007 375

2009 600

2011 580

2013 390

2# Create the following worksheet and save the workbook as

Conditional format.xls.

Name\Marks Physics Chemistry Biology Computer Math

Ram 70 65 89 76 67

Wasim 55 88 92 70 50

Sita 40 90 35 96 88

Rohit 25 76 57 34 70

Adnan 45 66 59 66 90

Saif 34 66 27 55 69

i. Freeze top row( as Subject row (phy, chem.))

ii. Colour using conditional formatting (as 70 to 80 red, 80 to 90

green, less than 100 blue,

between 0 to 30 yellow, less than 50 pink, between 50 to70

white.)

Ac

tiv

ity

A

ss

ign

me

nt

Page 19: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 19

AM

U

AM

U

AM

U

CS

D

3# The following is the summary of a Test Match played between India

Vs West Indies (below) Prepare a worksheet in Ms-Excel so that the

score board of each of the teams can be viewed in a tabular form.

Apply formulae for doing totals of runs and other requirements. Also

show score and bowling analysis using line Graph.

As

sig

nm

en

t

Page 20: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 20

AM

U

AM

U

AM

U

CS

D

WEEK #6

OBJECTIVES

To learn USING MS-ACCESS To learn the practical use of MS-ACCEESS.

OUTCOMES

After completing this, After completing this Lab, the students would be able to use keys, data entry, making tables.

1# Create table and insert atleast five employee detail (Emp-id,

designation, salary, address, manager etc)

Name Emp-id designation salary address manager

Mohan 1001

Ram

Danish

Rinki

Faiz

2# Write SQL queries for the following:

a) Display all records of employee details containing Emp-id

=‟1001‟.

b) Display all records of employee details having salary greater than

the minimum manager salary.

c) Display all records of employee whose name contains „an‟.

d) Display all records of employee details whose manager

=‟Mohan‟.

Ac

tiv

ity

LAB – 16-17-18

Page 21: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 21

AM

U

AM

U

AM

U

CS

D

Create table and insert employee detail(Emp-id , designation ,salary,

address, Contact no etc)

(Employee contact table)

(Employee record table)

a. List the contact no of each employee.

b. List the address of employee whose Id between 1002 to 1004.

c. Make a report on that employee whose address= „Shamshad

market, Aligarh‟.

Name Address Contact no

Mohan

Ram 09897650

Danish

Rinki

Faiz Shamshad

market,aligarh

Name Emp-id designation salary

Mohan 1001

Ram 1002

Danish 1003

Rinki 1004 Market executive

Faiz 1005

As

sig

nm

en

t

Page 22: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 22

AM

U

AM

U

AM

U

CS

D

WEEK #7

OBJECTIVES

To learn how to design an algorithm and draw a flowchart.

To learn the concept of variables and constants. To learn the different data types used in C

programming. To learn using the operators in C. To learn using if-else statement in C.

OUTCOMES

After completing this:

Students would be able to understand how to write, debug and run a simple C program.

Students would be able to know the memory occupied by different data types.

Student would be able to write an algorithm and draw flow charts of real life applications.

Student would understand how the decision making statement are handled in C programming.

1# Write a program to print the no. of bytes used by the different data

type using the sizeof() operator.

2# Develop a flow chart/algorithm and write an interactive program to

find Simple Interest and Compound Interest, where Principle, Rate

and Time are taken from the keyboard.

3# Develop a flow chart/algorithm and write an interactive program to

calculate the gross salary for input basic salary. The DA (dearness

allowance) is 70%, HRA (House Rent Allowance) is 15%, TA

(Travelling Allowance) is 20% of basic salary.

4# Develop a flow chart/algorithm and write an interactive program to

interchange the value of two variables. Note :- (both ways using

temporary variable and not using any other value)

Ac

tiv

ity

LAB – 19-20-21

Page 23: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 23

AM

U

AM

U

AM

U

CS

D

5# Develop a flow chart/algorithm and write an interactive program to

find the biggest and smallest number amongst the three numbers.

1# Write a program in C that uses to input the income and calculate and

report the owed tax amount. Make sure that your calculation is

mathematically accurate and that transaction errors eliminated.

Assume that the Income Tax Department uses the following income

tax slab for their annual income:

Income Tax Slab Income Tax Rate

Income upto Rs. 2,50,000 Nil

Income between Rs. 2,50,001 - Rs.

500,000

10% of Income exceeding Rs.

2,50,000

Income between Rs. 500,001 - Rs.

10,00,000

20% of Income exceeding Rs.

5,00,000

Income above Rs. 10,00,000 30% of Income exceeding Rs.

10,00,000

2# Write a program in C that reads the length of the three side of a

triangle (a, b, c) and determine what type of triangle it is, based on

the following cases:

If a > b+c no triangle is formed

If a2 = b

2+c

2 a right angled triangle is formed

If a2 > b

2+c

2 a obtuse angled triangle is formed

If a2 < b

2+c

2 a acute angled triangle is formed

As

sig

nm

en

t

Page 24: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 24

AM

U

AM

U

AM

U

CS

D

WEEK #8

OBJECTIVES

To learn using switch case in C. To learn using different types of loops (do-while

loop and while loop) in C.

OUTCOMES

After completing this, students would be able to write program consisting different control statements and loops.

1# Develop a flow chart/algorithm and write an interactive program in

C to find the week day by entering corresponding digit from the

keyword (from 1 to 7) using switch case.

2# Develop a flow chart/algorithm and write a program to reverse and to

sum of digits of a number which you entered from the keyboard.

3# Write an interactive program that reads in integers until a 0 is entered.

If it encounters 0 as input, then it should display:

- the total no. of even and odd integers.

- average value of even integers.

- average value of odd integers.

1# Armstrong numbers are those numbers whose sum of cubes of each

digit is equal to that number. For example: 153 = 13 + 3

3 + 5

3. Write

a program to find all Armstrong Number in the range of 0 and 999

2# Write a program to check the entered numbered is palindrome or not.

Noted that palindrome means a number and its reverse number is

same. For example: 1221.

3# Write a program to find the roots of a quadratic equation.

LAB – 22-23-24 A

ct

ivit

y

As

sig

nm

en

t

Page 25: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 25

AM

U

AM

U

AM

U

CS

D

WEEK #9

OBJECTIVES

To learn using for loop. To understand difference between different

types of loops available.

OUTCOMES

After completing this, students would be able to write program consisting for loop and nested for loop.

1# If a 5-digit number is entered from keyboard. Write a program to

print a new number by adding one to each of its digit. For example

for digit 12991 we get the output 23002.

2# Write a program to print a list of prime numbers between a given

ranges which you entered from the keyboard.

3# Write an interactive program in C to find the factorial of a given

integer.

4# Write a program to generate the series 12+2

2+3

2+4

2+...+N

2 and find

the sum of N (by user) terms.

5# Write a C program that prints shape giving below by using nested

loop:

1# Write a program to find the LCM (lowest common divisor) and

HCF (Highest Common Factor) of entered two numbers.

2# Write a C program that prints shape giving below by using nested

loop 1

1 2 1 2 3

1 2 3 4 1 2 3 4 5

1 2 3 4 1 2 3

1 2 1

LAB – 25-26-27

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

As

sig

nm

en

t

Ac

tiv

ity

Page 26: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 26

AM

U

AM

U

AM

U

CS

D

WEEK #10

OBJECTIVES

To learn the concept of One Dimensional Arrays in C.

OUTCOMES

After completing this, students would be able to understand how the one dimensional array handled in C.

1# Write an interactive program in C to find the largest and smallest

number from a given array of size N.

2# Write an interactive program in C to insert a value at a particular

location in the array of size N.

3# Write an interactive program in C to search a particular value in the

array of size N.

1# Write an interactive program in C to convert a decimal number to

Binary, Octal and Hexadecimal system.

2# Write an interactive program in C to insert two arrays of size N1

and N2 and merge them in an array of size N1+N2.

3# Write a menu driven program in C to show all the Operations of

one dimensional array as:

ARRAY OPERATION

1. INSERTION

2. DELETION

3. SEARCH

4. SORTING

5. MERGE

ENTER YOUR CHOICE :: ……..

Ac

tiv

ity

LAB – 28-29-30

As

sig

nm

en

t

Page 27: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 27

AM

U

AM

U

AM

U

CS

D

WEEK #11

OBJECTIVES

To learn the concept of Two Dimensional Arrays in C.

OUTCOMES

After completing this, students would be able to understand how the two dimensional array handled in C.

1# Write an interactive program in C to add two matrices of order N.

You should also mention the necessary condition for matrix

addition.

2# Write an interactive program in C to find the transpose of a given

matrix.

3# Write an interactive program in C to print the lower triangular

and upper triangular matrix of a given matrix.

1# Write an interactive program in C to multiply two matrices of

order N. Also check the necessary condition for the two matrices

to be multiplied.

2# Write an interactive program in C to find whether the given

matrix is symmetrical or not.

LAB – 31-32-33

Ac

tiv

ity

A

ss

ign

me

nt

Page 28: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 28

AM

U

AM

U

AM

U

CS

D

WEEK #12

OBJECTIVES

To learn the concept of Structure in C.

OUTCOMES

After completing this, students would be able to use the concept of Structure in the real life applications.

1# Write an interactive program in C to store the record of the N

students of a class and print them. The record consists of Name,

Class, Roll No, Enrolment, Marks.

2# Write an interactive program in C to store the record of the N

students of a class and arrange them rank wise. The record

consists of Name, Roll no, Marks.

3# Write a C program to add two distances entered by user.

Measurement of distance should be in inch and feet. (Note: 12

inches = 1 foot). Use the concept of structure.

4# Write a Program to accept five records of employee .The

Structure is:

struct

{

char name[25];

int age ;

int Basic;

}

Calculate the total salary of employees as:

Total Salary = Basic + DA + HRA

DA = 10% of Basic

HRA = 5% of Basic

Display the name, age and total salary of the employees in

descending order on the basis of total salary?

LAB – 34-35-36

Ac

tiv

ity

Page 29: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 29

AM

U

AM

U

AM

U

CS

D

1# Write an interactive program in C to store information (name,

roll and marks) of a student using structure.

2# Write an interactive program in C to add two distances (in

inch-feet) system using structures.

3# Write an interactive program in C to add two complex numbers

by passing structure to a function.

4# Write an interactive program in C to calculate difference

between two Time period using structure.

5# Write a menu driven program to manage a database of books.

(i) Insert new record.

(ii) Delete a record.

(iii) Display records of book.

(iv) Modify an existing record.

(v) List all records.

As

sig

nm

en

t

Page 30: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 30

AM

U

AM

U

AM

U

CS

D

WEEK #13

OBJECTIVES

To learn the concept of file handling in C.

OUTCOMES

After completing this, students would be able to store and manipulate simple records in a file and fetch some meaningful information from them.

1# Write an interactive program in C to create a file & store some

information (name class roll no) into it.

2# Write an interactive program in C to read the data from the file.

3# Write an interactive program in C to count the no. of lines,

characters, blank spaces from the text file.

4# Write an interactive program in C to convert the all the content

of a text file to uppercase.

1# Write an interactive program in C to capitalize first letter of

every word in a text file.

2# Write an interactive program in C to reverse the contents of a file

and print it.

3# Write an interactive program in C to join lines of two given files

and store them in a new file.

LAB – 37-38-39

Ac

tiv

ity

A

ss

ign

me

nt

Page 31: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 31

AM

U

AM

U

AM

U

CS

D

WEEK #14

OBJECTIVES

To learn the concept of sub programming in C. To learn the concept of recursion.

OUTCOMES

After completing this, students would be able to write user define function and call them at different places.

Student would be able to write recursive program rather than iterative program.

Student would be able to distinguish between recursive approach and iterative approach for writing C program.

1# Write a function that calculates the compounded interest amount

for a given initial amount, interest rate & no. of years. The

interest is compounded annually. The return value will be the

interest amount. Use the following function definition: float

comp_int_calc(float int_amt, float rate, int years); Write a

program that will accept the initial amount, interest rate & the no.

of years and call the function with these values to find out the

interest amount and display the returned value.

2# Write a user defined function swap() in C to exchange the values

of two variable with using third variable and also without using

third variable. (use the concept of call be value and call by

reference).

3# Write a program to find the factorial of a given no using

recursion.

1# Write a program in C to print the Fibonacci series upto N terms

using recursion.

2# Write a function that returns the minimum and the maximum

value in an array of integers. Inputs to the function are the array

of integers, an integer variable containing the length of the array

and pointers to integer variables that will contain the minimum

and the maximum values. The function prototype is:

void minmax( int array[], int length, int * min, int * max);

LAB – 40-41-42

Ac

tiv

ity

A

ss

ign

me

nt

Page 32: Laboratory Manual - Aligarh Muslim University · Laboratory Manual B. Sc. ... 6 Garima 80 80 ent. ... Enclosure: Resume (the format given below). Format of Resume Name :

LAB MANUAL/CCB–1P1/DoCS-AMU Page 32

AM

U

AM

U

AM

U

CS

D

WEEK #15

OBJECTIVES

To learn the concept of Pointers in C. To learn using string operations.

OUTCOMES

After completing this, students would learn to use pointers in C.

Students would be able to handle string and its associated operations.

1# Write a function that will return the length of a character string.

You are not to use the strlen C library function. (Hint: Use

„Pointers‟ concept).

2# Write a program in C to store n elements in an array and print the

elements using pointer.

3# Write a program in C to print all permutations of a given string

using pointers.

4# Write a program in C to count the number of vowels and

consonants in a string using a pointer.

5# Write a program in C to print a string in reverse using a pointer.

1# Write a function countEven (int*, int) which receives an integer

array and its size, and returns the number of even numbers in the

array.

2# Write a function contains (char*, char) which returns true if the

1st parameter contains the 2nd parameter or false otherwise.

3# Write a program to compute sum of the array elements using

pointers.

LAB – 43-44-45

Ac

tiv

ity

A

ss

ign

me

nt