CP Lab Manual
CP Lab Manual
CP Lab Manual
Lab Manual
Prepared By
Verified By
Mr.P.Suresh Babu
Ms.J.Mahalakshmi
[HOD/IT]
Table of Contents
Sl. No
Description
Page No.
1
2
3
4
5
6
7
7a
3
4
5
6
7
8
9
10
7b
12
14
8a
31
11
Introduction to C programming
57
11
58
12
65
83
87
95
98
99
9
10
13
14
15
16
17
18
19
20
35
46
52
72
79
92
To introduce Microsoft Word 2007 and its features. Students are trained in Microsoft
Word 2007 for document preparation, text manipulation, equation editing, table creation,
formatting, and conversion, drawing diagrams and flowcharts, mail merge, and letter
preparation.
To introduce Microsoft Excel 2007 and its features. Students will be taught to enter,
export and import data, use formulas, chart preparation and chart conversion in Microsoft
Excel 2007.
Basics of C language are taught to the students. Concepts such as data types,
expressions, decision making, looping, arrays, structures, unions, functions, pointers and
file handling are dealt in this course.
Students will be able to document their reports and assignments using Microsoft Word
2007.
Students will be able to input and plot data on a Microsoft Excel 2007 spreadsheet and
analyze the data through use of charts and formulas.
Students will be familiar with the use of the Microsoft Visual Studio 2010 IDE for
executing and debugging their C programs.
Students will be equipped to model a software solution for real time problems.
Student will be able to demonstrate hardware interfacing with C using the open source
Arduino platform (Beyond the Syllabus material).
INSTRUCTIONS TO STUDENTS:
Format of Experiments:
The lab instructions include the following:
Title Title of the experiment.
Objectives What does the student learn from the experiment.
Concepts Involved A brief introduction about the concept for the experiment.
Procedure Steps to perform the experiment.
Output Output of the experiment in screen shots.
Results & Discussions Answers to the questions in the Procedure section and results.
Student Lab Report
1. For each experiment, it is expected each student writes a report to:
Answer questions in the instruction sheet.
Explain her/his observations from the experiment.
Analyze the results collected from the experiment.
2. Your report should be presented in MS Words.
3.
4.
5.
6.
1 day- 1 mark
2 days- 3 mark
3 days- experiment will not be signed
7. Students are expected to do mini projects which will be allotted to them and they will
be awarded bonus marks for that.
8. Viva session will be there in every lab class for which you will be awarded 10 marks.
Mark allotment for experiment:
Total: 30 marks
Viva: 10
Performance: 10 (includes the output)
Record: 10
Note: If there is uniformity of code and output of the program the student will
be allowed to continue to do the lab.
not
LTPC
0032
LIST OF EXPERIMENTS
Requirements
Microsoft Office/OpenOffice
This program allows you to create PDF files from any Windows program, and is used as a (soft)
printer.
Note: Sourceforge.net is the Web's biggest repository of open source, free, and shareware
programs. You are encouraged to browse through some of its vast collections, and try out any
program that you might find interesting.
4. PDF file merge program - PDFMerge
Available from
http://www.pdfmerge.com/
This program can be used to merge multiple, PDF files for convenient access as a single file.
5. CD/DVD burning software - InfraRecorder
Available for download from
http://infrarecorder.org/
10
This open source software is useful for burning data/audio/video files to CD/DVD, as well as to
create 'image' of a CD/DVD as .iso file (which contains all the information contained on a
CD/DVD).
6. Audio editor and recorder software - Audacity
Available at http://audacity.sourceforge.net/
It is an open source software which can be used to record audio input and edit audio sounds/files,
on the PC.
7. Image Viewer - IrfanView
Available at
http://www.irfanview.com/
IrfanView is a free, fast, and compact program to view images in many popular files and to create
slideshows of multiple images. It can be also used for limited image modifications.
8. Multimedia viewers: Apple QuickTime, iTunes, Windows Media Player, RealPlayer, VLC
Media Player
9. Archiving and data compression software - 7-zip (free), WinRAR (shareware)
10. Typewriting tutor software - TypeFaster
If you are going to be typing for hours a day on your PC, and for years to come, it makes
sense to learn the basic keyboard layout so you type faster with less error, and reduce the pain on
your fingers and wrists! Available at
http://sourceforge.net/projects/typefaster/
CAUTION: While downloading and installing software from the Web, students are urged to
watch out for virus and malware that could slow down or even damage their PC, and watch out
for unintended installation of additional programs!
11
In Firefox, the browser add-on Morning Coffee can be used for this purpose:
12
The NY Times is the world's most well-known newspaper and contains articles on stateof-art R&D from the world's leading universities, research laboratories, and tech companies.
2. BBC News Technology: http://www.bbc.co.uk/news/technology/
Contains articles and videos on current technology developments.
3. Wired magazine: http://www.wired.com/
Contains latest news on computers, Internet, games, and gadgets.
4. Ars Technica: http://arstechnica.com/
Leading source of news on computers, software, IT, and has many forums and blogs for
programmers and developers.
5. Computer World magazine: http://www.computerworld.com/
Source of news on computer technologies, and has related websites like
www.infoworld.com, www.networkworld.com, www.javaworld.com, etc. Focuses mainly on
software, IT networking and administration, and programming including quizzes and interview
questions.
6. IEEE Spectrum Magazine online: http://spectrum.ieee.org/
The Institute of Electrical and Electronic Engineers (IEEE) is the world's largest
professional society of electrical, electronics, and computer engineers. The Spectrum is its
magazine devoted to covering technological developments at a level accessible for undergraduate
students.
7. Crossroads The ACM Magazine for Students: http://xrds.acm.org/
The Association for Computing Machinery (ACM) is the world's leading society of IT
professionals. Needs student membership of ACM for access!
8. Make Magazine online: http://makezine.com/
Make magazine is devoted to promoting a culture of do-it-yourself (DIY) making of
gadgets, robots, games, and other projects, by engineers, college and high school students, as well
as hobbyists. It promotes open source hardware and software technologies through these projects.
9. http://www.instructables.com/
This site is similar to Make magazine online, but covers more general areas, in terms of
projects.
10. TED (Technology, Entertainment, Design): http://www.ted.com/
Contains several video talks on technology and related areas by achievers ranging from
scientists and engineers to laypersons and high school students. Students can download them,
with subtitles, for later viewing.
13
14
Experiment 1
Search, Generate and Manipulate data using MS Office/ OpenOffice
Aim:
To learn and apply features of MS Word 2007 for the preparation of documents for
different purposes such as writing papers, resumes, and cover letters.
Concepts Involved:
To open MS Word 2007: Start All Programs Microsoft Office Microsoft Office Word 2007.
Searching for a keyword:
Word's Find and Replace function will search your documents for specific text (words, phrases,
etc), which will then be highlighted and can be replaced with different text.
To find any text, you must first access the Find and Replace dialog box. From
the Home command tab, in the Editing group, click FIND. Or as a shortcut, you can simply Press
[Ctrl] + [F].
From the Home command tab, in the Editing group, click REPLACE or Press [Ctrl] + [H] .
The Find and Replace dialog box appears, with the Replace tab displayed.
1. After highlighting the text, the Font tab can be used to change the font size/color/style
(bold text, italic text, underline, or their combinations).
15
2. After selecting a particular paragraph, text can be aligned to the left, right, center or
justify and use bullets, color the background behind the selected text.
Advice: Students should note that the preference in typesetting is for jagged right justify
([Ctrl]+L) rather than (full) justify ([Ctrl]+J[]). The latter is considered ugly due to uneven
spacing among words to justify the text on both left and right sides. See
http://www.chicagomanualofstyle.org/qanda/data/faq/topics/ManuscriptPreparation/faq00
41.html
3. To find a particular word from this document, editing option can be used. Here Find,
Replace and Select options available.
Insert menu:
Pages can be aligned through page break, blank page, and cover page.
Creating a Table:
Step 1: Click the word document where the user wants to insert the table and go to insert
menu. Select Table under Tables then click Insert Table.
Step 2: Enter the number of columns and rows for creating a table and then click OK.
16
Step 3: Enter the data into the table. You can right-click on the table or on the + at the top
left of the table to modify the properties of the table.
Use of Illustrations and Tables: Illustrations can be used for drawing pictures, clip art,
shapes, flowchart symbols, and charts.
17
Step 2: After selecting hyperlink, user choose the document to which you want to link.
Step 3: Now, Press Ctrl key and click the hyperlink word and it appears in the document.
Use of Headers and Footers: The Header & Footer menu under Insert can be used to insert
Header/Footer/Page Number for the document at specified locations.
18
Use of Symbols, Subscripts, and Superscripts: Symbols can be used in text and inline
equations (the equation is in the same line as a text), e.g., " is used to indicate ...".
However, when subscripts and superscripts are used this way, the interline spacing may
not be uniform, and text fonts are used for equation, e.g., a2x2 + a1 x + a0 = .
We can use the Equation Editor (see below) for entering complex equations, with default
equations available for quadratic equation roots, area of circle, binomial theorem, and
Fourier series.
It is a formula editor that allows the user to construct math and science equations.
Step 1: Click where user want to insert the equation. On the Insert menu, click Object.
19
Step 2: In the object type box, click Microsoft Equation 3.0 and then click OK.
Step 3: Build the equation by selecting symbols from the equation and by typing variables
and numbers. From the top row of the equation toolbar, user can choose from more than
150 mathematical symbols. From the bottom row, the user can choose from a variety of
templates or frameworks that contain symbols such as fractions, integrals and
summations.
20
Track Changes:
Ref: http://office.microsoft.com/en-us/word-help/track-changes-while-you-edit-HA001218690.aspx
Track changes is a very useful editing command that is commonly used when a user
creates an original document and makes changes and want to keep track of the changes
that are made to that original document to accept or delete later. It is also a useful tool for
collaborating on a document, as it allows multiple users to make revisions without losing
the context of the original document.
Step 1: Select Track Changes under Review which allows user to see what changes have
been made to a document. The changes made appear in RED, with underlining, and a
vertical tab on the left side of the page on the corresponding line appears showing where
changes occur.
Step 2: If a user wants to incorporate the changes which are made to the original
document then select Accept above Changes tab in the Review menu. Otherwise select
21
Reject" above "Changes. You can also accept All Changes in the Document, to
incorporate all the changes in one step.
There are four ways to view a document after the tracked changes.
Final Showing Markup: This shows the document with the changes displayed
Final: This shows the changed document, without the changes displayed
Original Showing Markup: The original document with the changes displayed
Original: The original document without any changes.
22
23
Practice Problem
24
25
Drawing in MS Word:
Step 1: Click in the document where user wants to create the drawing.
Step 2: On the Insert menu, select shapes or picture in the illustrations. Use the format
menu to add any shapes that user want.
Reference: See
http://www.ncsu.edu/labwrite/index_labwrite.htm - for descriptions of Pre-, In-, and Post-
In Lab Exercises:
1. Prepare a one-page resume which describes your career objective, qualifications, prizes,
extracurricular, co-curricular activities, and personal details. (Refer the following format
as a template, or find one online that you like!)
27
Web Resources:
a. http://akrion.net/short-1-page-resume-template/
b. http://career-advice.monster.com/resumes-cover-letters/resume-writing-tips/onepage-or-two-page-resume/article.aspx
28
2. Prepare a cover letter for an interview for an internship position (e.g., in BSNL during
your semester vacation for two weeks).
Web Resources:
a. http://owl.english.purdue.edu/owl/resource/723/03/
b. http://susanireland.com/using-a-resume-cover-letter-template/
c. http://www.career.vt.edu/jobsearchguide/coverlettersamples.html
3. Create a one-page document which describes your field, Information Technology.
4. Write the following equations in your document.
i. Ca (HCO3)2 CaCO3 + CO2 +H2O ("in-line" equation)
ii. (A+B) 2 = A2 + B2 + 2 AB (both as in-line equation and using Equation
Editor; see the difference in the two equations!)
iii.
iv.
4 9 4
29
Viva-Voce Questions:
1. What is WYSIWYG?
2. List out major open source alternatives to MS Office. What are advantages and
disadvantages? (Bonus marks will be 15% for installing the alternate software on your
laptop, and producing a sample document).
3. How will you read a document created with a new version of MS Word if you have an
older version of MS Word?
4. How will MS Word help you to compare two similar documents?
5. Can you keep different versions of a document in the same file? Explain your answer.
6. How will you count the number of words, characters, lines, and paragraphs in an MS
Word document?
7. What shortcut key will you use to jump to a specific page in MS Word?
3. State how MS Word will be terminated and the document will be recovered if MS Word
hangs or the PC power goes out?
4. Explain how a single document can be created by combining a number of word
documents?
31
Microsoft Office was once the go-to source and industry standard for office productivity
applications. As the office suite landscape continues to change and evolve, were seeing more and
more open source software springing up that lack little in the way of features and provide free
alternatives to the productivity king that dominated the market for years on end.
Whether youre at home or on the road with your mobile device, word processing, spreadsheets,
presentation software, and more are now all accessible anywhere you have an Internet
connection. Its been a long time coming, but the reign of Microsoft Office is drawing to a close.
While you could use Microsofts free Office Web Apps, weve rounded up six of our top picks
for some of the best Microsoft-free alternatives so you can carry out basic office tasks without
paying a cent. These resources will make it easy to continue hammering out those word docs,
spreadsheets, and presentations while keeping your wallet at bay.
Google Docs
Google Docs is at the forefront of open office software for many reasons just check out our
piece on why Gmail is awesome if you have any qualms regarding the software. It has all the
basic perks of Microsoft Office word processor, spreadsheets, and presentation capabilities
32
but its completely free and accessible online through Googles cloud-based storage service,
Google Drive. It provides a nice, central hub for all your documents, and the sheer potential for
collaboration makes the software a stand out among the rest. You can create, share, and edit
documents with anyone, regardless of whether they have a Google account. Also, the ability to
view document changes in real time even those made by several people at once in the same
document has its advantages.
From Microsoft Word documents to PDFs, Google Docs supports a wide array of file types, all of
which can be downloaded for offline use. Added perks include image editor Google Drawings,
and online form creator Google Forms. Plus, Google Docs works well with other Google services
like Google+, Gmail, and Google Calendar for greater integration capabilities and convenience.
Although the program is free, you can upgrade from the allotted 5GB of space for a mere $2.50 a
month. Be sure to download the Google Drive app for Android and Apple devices to access your
files on your mobile device.
OpenOffice
OpenOffice is one of the more renowned pieces of open source software on the market and has
been so for more than 10 years. The bundle contains tools for word processing, spreadsheets,
presentations, graphics, databases, and a slew of other capabilities. The software can be
downloaded and used completely free of any licensing fees and stores your data in an
international open standard format. It can also read and save Microsoft Word documents so you
dont have to sweat over any compatibility issues.
33
The current version of OpenOffice offers a treasure trove of developer extensions and supports
most common operating systems, including Microsoft Windows, Mac OS X, and GNU/Linux.
Its not as advanced for collaboration as Google Docs, but the package offers a solid line of
productivity tools that are frequently updated with new features.
LibreOffice
LibreOffice is essentially an open office suite that parted ways with Apache OpenOffice back in
2010. It uses the same underlying source code under the hood, features the same basic
productivity tools as OpenOffice, and even works in a similar manner. The major difference
between the two is the increased amount of development the Document Foundation has poured
into the LibreOffice software over the years. LibreOffice showcases a few more advanced
features, such as a Wiki publisher, and offers greater functionality given the available extensions
and customization options. Its fairly intuitive, simple to use, and dons a modern design that
comes up just short of Microsoft Office.
34
The current version of LibreOffice supports most common operating systems, including
Microsoft Windows, Mac OS X and GNU/Linux. The software can even be installed on a
portable drive or SD card so you can throw it in your pocket before you head out. A mobile app
for Android and Apple devices is also in the works.
35
Experiment 2
Presentation and Visualization Graphs, Charts, 2D & 3D
Aim:
To learn and apply basic features of MS-Excel for data visualization, and MS-PowerPoint
2007 to develop a presentation.
Concepts Involved:
What is MS Excel?
It is spreadsheet program, the computerized equivalent of a ledger. It is part of the MS
Office suite, and is used to analyze worksheets and workbooks. Its menus, toolbars, and dialog
boxes are similar to MS Word.
Applications of Excel:
Number crunching (analyze data)
Creating charts, diagrams, and graphics
Import data for processing (e.g., from MS Access)
Organizing lists (e.g., tables of data)
Automating complex tasks (using macros)
36
Step 2: Select the data range of interest (including labels), by click and drag from top left to
bottom right of the range of cells. Next, click on Insert on the menu bar, and select the type of
chart/graph (Column, Line, Pie, Bar, Scatter (x-y graph)) desired.
37
Step 4: Complete the chart by giving labels for x and y axes, change default a suitably, and
give a title above/below the graph, as shown below.
38
Some of the commonly used functions are sum, average, max, min, count, sin, cos, tan, if,
and etc.
Syntax:
FUNCTION
=Sum (first value, second value, etc)
=Average (first value, second value, etc)
=Max (first value, second value)
=Min (first value, second value)
=Sin (value)
39
EXAMPLE
=SUM (A2:A4)
=Average (A2:A5)
=Max (A2, A4)
=Min (A2, A3)
=Sin (A2)
=Cos (value)
=Tan (value)
=IF (condition, value-if-true, value-if-false)
=Cos (A2)
=Tan (A2)
=IF (A2>50, Pass, Fail)
Comments:
1. Instead of entering radius values in sequence manually, I used a formula (A9=A8+1) to
increment them. Then, I dragged the "fill handle" (at bottom right of cell A9) all the way to A18
to fill in the remaining radius values automatically.
2. I wrapped the text in above comment manually by Enter, so all the content remains in the same
page; I can verify this by clicking Page Preview icon on the menu bar.
3. I have beautified the spreadsheet by using font selection, borders, etc!
4. I have done reducing the width of column A manually.
5. I have reduced the number of decimal places to 3 in Column B, by right clicking on column B,
select Number under Category, and choose 3 under Decimal places.
6. The little red triangle on the top right of cell F6 shows there is a Comment there. You can view
this comment simply by placing the cursor in that cell.
40
With both A and V plotted along the primary axis, the graph appears as above.
For the above graph/chart, I selected the cells in range A7 to D18, clicked insert under manu,
Scatter with Smooth Lines under Scatter under Charts. Due to the different scales of variation, I
cannot see Circumference data well. So, I need to move V to be shown on the Secondary Y axis.
To do this, I click on the graph for V and data points are highlighted. Next, I right click the mouse
on the graph, and in the pop-up menu (left) click on Format Data Series. In the Format Data
Series window that now appears, under Series Options on the left, I click on Secondary Axis on
the right, and select Close. Now, the V data curve is redrawn with Secondary Y-axis. If at any
stage you make a wrong selection, simply press ESC!
Questions: How did I remove the three decimal place zeros on y-axis? Add suitable x and y axis
labels, add a title to the figure (centered above and font- changed), and change the legend (e.g., C
Circumference, etc). Resize the figure suitably, and try adjusting or removing the grid lines.
41
Note: While submitting Excel homework, students are advised to submit both the data table (and
screenshot, if relevant) and the graph. As in the example above, show any formulas used and print
out the column and row headings so that the Instructor can see how the formulas are applied.
To print the column and row headings, click on Page Layout on the menu bar, and under
Sheet Options, click the box next to Print under Headings. The printout will appear as below:
Step 2: Create your first slide. Select Layout in the Home menu. From this, select the layout
which will satisfy the user to prepare the presentation.
42
Step 3: Add a new Slide. It can be done either by clicking the New Slide button in the top
toolbar, or by typing Ctrl+M, or by right click on the first slide and select net slide.
Step 4: Add Content on slides. Content can be added using Insert menu and choose the type
of the content that user want to add to that slide.
43
Step 5: Change slide themes or backgrounds. To choose a theme, Select themes from the
design menu.
Step 6: View slideshow. To view the final PowerPoint, Click Slide Show in the top toolbar or
press F5.
44
Reference: Refer to the file Technical Communication PPT for some basic information and
advice on how to prepare your written technical reports/papers using MS Word, and oral
presentations using MS PowerPoint.
Projected Sales
Jan
50,000
Mar
75,000
May
98,000
July
125,000
Sep
200,500
Nov
250,900
In Lab Exercises:
1. On a long trip, you average 62.5 kmph, complete the following table and graph the
function as a line chart.
0
1
2
3
4
5
6
7
8
Hours
Travelled
Miles
Traveled
2.
62.5
Viva Questions:
1. How will you add animation to your MS PowerPoint for slides?
2. How will you add graphics, movie clips and audio files to a PowerPoint file?
3. Is there a way to make your own animation and play them in PowerPoint?
46
Experiment 3
Problem Formulation, Problem Solving and Flow Charts
Aim:
To draw flow chart for problems using Microsoft Word 2007.
Concepts Involved:
Ref: http://en.wikipedia.org/wiki/Flowchart
Method of problem solving:
The following five steps are used in a computer as a problem solving tool.
1.
2.
3.
4.
5.
Flowcharts:
It is a graphical representation of any program and it is helpful for understanding the
complicated process.
Guidelines for drawing flowcharts:
Flowcharts are usually drawn using some standard symbols. Some special symbols can
also be developed when required.
Some standard symbols are frequently required for flowcharting many computer C
programs.
Standard Symbols:
The major symbols are Decision (Selection) and Sequence (Process) symbols. Start and
Stop symbols are called Terminals. The Sub process symbol is a variation on the
sequence symbol. There are also connectors drawn between the symbols. For connectors,
we are using arrow i.e
47
START / STOP
SEQUENCE
DECISION
SUB SEQUENCE
48
Step 3: To add content into the shapes, right click on the shape and select Add Text.
Step 4: Use the connector (i.e. ) to show the sequence of steps to be executed by the programs.
49
Step 5: Decision box is used to check the condition. It has either yes or no option.
Draw a flow chart to find the sum of the first 50 natural numbers.
Draw a flow chart to find the largest among three numbers.
Draw a flow chart to check whether a given number is odd or even.
Draw a flow chart for search prime number.
50
In Lab Exercises:
1.
2.
3.
4.
5.
Viva Questions:
1.
2.
3.
4.
5.
INPUT A, B, C
LARGEST A
YES
B > LARGEST
NO
51
LARGEST B
YES
C > LARGEST
NO
STOP
52
LARGEST C
Mr. Ritchie, who lived alone, was in frail health in recent years after treatment for prostate cancer
and heart disease, said his brother Bill.
In the late 1960s and early 70s, working at Bell Labs, Mr. Ritchie made a pair of lasting
contributions to computer science. He was the principal designer of the C programming language
and co-developer of the UNIX operating system, working closely with Ken Thompson, his
longtime Bell Labs collaborator.
The C programming language, a shorthand of words, numbers and punctuation, is still widely
used today, and successors like C++ and Java build on the ideas, rules and grammar that Mr.
Ritchie designed. The UNIX operating system has similarly had a rich and enduring impact. Its
free, open-source variant, Linux, powers many of the worlds data centers, like those at Google
and Amazon, and its technology serves as the foundation of operating systems, like Apples iOS,
in consumer computing devices.
53
The tools that Dennis built and their direct descendants run pretty much everything
today, said Brian Kernighan, a computer scientist at Princeton University who worked with Mr.
Ritchie at Bell Labs.
Those tools were more than inventive bundles of computer code. The C language and UNIX
reflected a point of view, a different philosophy of computing than what had come before. In the
late 60s and early 70s, minicomputers were moving into companies and universities smaller
and at a fraction of the price of hulking mainframes.
Minicomputers represented a step in the democratization of computing, and UNIX and C were
designed to open up computing to more people and collaborative working styles. Mr. Ritchie, Mr.
Thompson and their Bell Labs colleagues were making not merely software but, as Mr. Ritchie
once put it, a system around which fellowship can form.
C was designed for systems programmers who wanted to get the fastest performance from
operating systems, compilers and other programs. C is not a big language its clean, simple,
elegant, Mr. Kernighan said. It lets you get close to the machine, without getting tied up in the
machine.
Such higher-level languages had earlier been intended mainly to let people without a lot of
programming skill write programs that could run on mainframes. Fortran was for scientists and
engineers, while Cobol was for business managers.
C, like UNIX, was designed mainly to let the growing ranks of professional programmers work
more productively. And it steadily gained popularity. With Mr. Kernighan, Mr. Ritchie wrote a
classic text, The C Programming Language, also known as K. & R. after the authors initials,
whose two editions, in 1978 and 1988, have sold millions of copies and been translated into 25
languages.
Dennis MacAlistair Ritchie was born on Sept. 9, 1941, in Bronxville, N.Y. His father, Alistair,
was an engineer at Bell Labs, and his mother, Jean McGee Ritchie, was a homemaker. When he
was a child, the family moved to Summit, N.J., where Mr. Ritchie grew up and attended high
school. He then went to Harvard, where he majored in applied mathematics.
While a graduate student at Harvard, Mr. Ritchie worked at the computer center at the
Massachusetts Institute of Technology, and became more interested in computing than math. He
was recruited by the Sandia National Laboratories, which conducted weapons research and
testing. But it was nearly 1968, Mr. Ritchie recalled in an interview in 2001, and somehow
making A-bombs for the government didnt seem in tune with the times.
54
Mr. Ritchie joined Bell Labs in 1967, and soon began his fruitful collaboration with Mr.
Thompson on both UNIX and the C programming language. The pair represented the two
different strands of the nascent discipline of computer science. Mr. Ritchie came to computing
from math, while Mr. Thompson came from electrical engineering.
We were very complementary, said Mr. Thompson, who is now an engineer at Google.
Sometimes personalities clash, and sometimes they meld. It was just good with Dennis.
Besides his brother Bill, of Alexandria, Va., Mr. Ritchie is survived by another brother, John, of
Newton, Mass., and a sister, Lynn Ritchie of Hexham, England.
Mr. Ritchie traveled widely and read voraciously, but friends and family members say his main
passion was his work. He remained at Bell Labs, working on various research projects, until he
retired in 2007.
Colleagues who worked with Mr. Ritchie were struck by his code meticulous, clean and
concise. His writing, according to Mr. Kernighan, was similar. There was a remarkable precision
to his writing, Mr. Kernighan said, no extra words, elegant and spare, much like his code.
A version of this article appeared in print on October 14, 2011, on page A22 of the New York
edition with the headline: Dennis Ritchie, 70, Dies; Trailblazer in Digital Era.
55
http://articles.washingtonpost.com/2011-10-13/local/35277916_1_dennis-ritchie-charles-petzoldunix
Dennis Ritchie, founder of UNIX and C, dies at 70
Dennis Ritchie worked at Bell Laboratories for four decades, from his time (/ALCATEL-LUCENT)
Dennis Ritchie, 70, a computer scientist who changed modern technology by writing an elegantly
simple computer programming language, was found dead at his home in Murray Hill, N.J., his
former colleague Rob Pike said.
Pike received word Oct. 12 that Dr. Ritchies body had been discovered last weekend. A cause of
death was not immediately available.
As the news of his death spread throughout the computer science world, historians and computer
enthusiasts compared the bearded, introverted Dr. Ritchie to media-savvy Apple co-founder Steve
Jobs, who died Oct. 5.
Its sort of apples and oranges, said Paul Ceruzzi, a Smithsonian historian and expert on the
history of computers. Ritchie was under the radar. His name was not a household name at all,
but... if you had a microscope and could look in a computer; youd see his work everywhere
inside.
Dr. Ritchie worked at Bell Laboratories for four decades, from his time as a Harvard doctoral
student until his retirement in 2007. He was the inventor of the programming language known as
C and co-inventor of the operating system UNIX, another innovation that came from Bell Labs in
the late 1960s and early 70s.
When Dr. Ritchie went to Bell, computer programming language was arcane and impenetrable
for many computer gurus of the era. As a young scientist, Dr. Ritchie went to work on a language
that was sophisticated yet simple. Something of a night owl, he often went to the office about
noon and worked into the night from his home.
He named his creation C because programming language that came before it was called B.
C is a terse, elegant, deceptively simple language that allows programmers almost unlimited
flexibility, technology writer Charles Petzold wrote in the New York Times in 1996. It appeals
to the macho instincts of young and wild PC hackers, as well to the puzzle-solving impulses of
more mature programmers because of its power and the variety of ways to solve problems.
C was not without flaws it was vulnerable to viruses, Petzold wrote but it soon became the
most popular programming language. It allowed programmers to do in a few months jobs that
with other languages would have taken a year or more.
56
C language was the foundation for UNIX, the operating system Dr. Ritchie helped develop with
Bell colleague Kenneth Thompson. Microsoft Windows-based personal computers and many
Apple products run on its descendents. It is the ancestor of most of the infrastructure of our
wired society, Ceruzzi said.
Dr. Ritchie and Thompson received the Turing Award from the Association for Computing
Machinery in 1983 an early recognition of what would be an enduring contribution to
technology, said Tim Bergin, a computer language historian and professor emeritus at American
University.
More honors followed. In 1998, President Bill Clinton awarded the two men
of Technology and Innovation for their invention of UNIX operating
programming language, which together have led to enormous growth of
thereby enhancing American leadership in the Information Age. Early this
the prestigious Japan Prize for science and technology.
Dennis MacAlistair Ritchie was born Sept. 9, 1941, in Bronxville, N.Y., to a scientific family.
His father, Alistair Ritchie, worked at Bell and co-wrote a book on switching circuits. The
younger Ritchie attended Harvard, where he earned a bachelors degree in physics in 1963 and a
doctorate in applied mathematics in 1968.
My undergraduate experience convinced me that I was not smart enough to be a physicist, and
that computers were quite neat, he wrote in a biography for Bell Labs. My graduate school
experience convinced me that I was not smart enough to be an expert in the theory of algorithms
and also that I liked procedural languages better than functional ones.Survivors include two
brothers, William Ritchie of Alexandria and John Ritchie of Newton, Mass., and one sister, Lynn
Ritchie of Hexham, England.
Dr. Ritchie co-wrote the book The C Programming Language, a volume on the order of a
technological Oxford English Dictionary.
He had a lighter side, too. With Pike, he lined up the magician duo Penn and Teller for a practical
joke on his boss, Nobel Prize-winning physicist Arno Penzias. In the stunt, videotaped in 1989
and available on YouTube, the two scientists convinced Penzias that they had invented fancy
voice-recognition technology. It took him days to recover, the voice-over says.
57
C PROGRAMMING
I/O Statements in C
printf - used to print the character, string, float, integer, octal, and hexadecimal values onto the console
Reference: http://en.wikipedia.org/wiki/C_language
Syntax:
int printf(const char *format, ...);
Format Explanation
Example
%d
Display an integer
10
%f
10.500000
%.1f
10.5
%e
1.050000e+01
%g
Returns
The printf function returns the number of characters that was written. If an error occurs, it will return a
negative value.
Required Header
The required header for the printf function is:
#include <stdio.h>
scanf
int scanf ( const char * format, ... );
Specifier Description
Characters extracted
i, u
Any
Integer
number
of
digits,
optionally
preceded
by
sign
(+ or -).
Decimal digits assumed by default (0-9), but a 0 prefix introduces octal digits
58
Decimal
integer
Octal integer
Hexadecimal
integer
Any
f, e, g
Floating
number
point
Character
String
characters
number
of hexadecimal
optionally
of
Return Value
If successful, the total number of characters written is returned, otherwise a negative number is returned.
preceded
59
A window as shown below appears. See that Visual C++ as shown in Figure is chosen. Goto
Win32 Console Application
Enter name, choose location and give ok
60
61
A window as shown below appears. Make sure Visual C++ template is chosen and then click
C++ File option
Give file name with extension .c Eg. One.c (Please note that .cpp is the file extension for c++
programs, which you will study in the OOPS course).
62
63
If there are compilation errors then they appear in the output window.
Click on the error to locate it and correct. If you are unable to figure out the error, you can cut and
paste the error message in Google in your web browser, go online, and find a possible solution to
try out!
If there is no error then go to Debug Menu and choose the option Start without Debugging.
64
65
Experiment 4
C Programming using Simple Statements and Expressions
Aim:
To write a C program to demonstrate the use of data types, simple statements, and
expressions.
Concepts Involved:
Data types: Data types are used to declare a variable before its use. Built-in data types are int,
float, char and double.
Declaration :
[Data type name] [Variable name];
E.g. int g;
char c;
Variables: A variable is the name given to a storage area that the programs can manipulate.
Operators:
Arithmetic Operators:
Operator
Operation
Explanation
Addition
Subtraction
Multiplication
Division
Modulus
Assignment operators:
Simple operator
Compound
Operator
sum = 10
Value 10 is
variable sum
+=
sum+=10
-=
sum =
10
*=
sum*=10
/+
sum/=10
%=
sum%=10
&=
sum&=10
^=
sum^=10
Relational operators:
Operator
Example
>
x>y
<
x<y
>=
x >= y
<=
x <= y
67
assigned
to
==
x == y
!=
x != y
Logical operators:
Operator
Example
&&
x && y
||
x || y
Conditional operators:
Syntax :
(Condition? true_value: false_value);
Example:
(A > 100? 0: 1);
If A is greater than 100, 0 is returned else 1 is returned. This is equal to if else conditional
statements.
68
Bitwise operators:
x/y
x&y
x^y
Operator
Explanation
&
Bitwise AND
Bitwise OR
Bitwise NOT
XOR
<<
Left Shift
>>
Right Shift
Example:
++var_name;
(or)
var_name++;
(or)
- var_name;
(or)
var_name- -;
++i, i++, - -i, i- -
Special Operators:
S.no
Operators
Description
&
Size of ()
ternary
Type cast
Precedence Table:
Operators
Associativity
Arithmetic Operators
Left to Right
Left to Right
Logical Operators
Left to Right
Conditional Operators
Right to Left
Bitwise Operators
Left to Right
Pre Lab Exercises (test your programs with sample inputs, with descriptive
"Enter ..." statements!):
1.
2.
3.
4.
Write a C program to convert degree Celsius into Fahrenheit and vice versa.
Write a C program to find the area and circumference of a circle and a rectangle.
Write a C program to add three numbers (use file input/output!).
Write a C program that prints the next character for the given character (in English
alphabet).
70
In Lab Exercises: (test your programs with sample inputs, with descriptive
"Enter ..." statements!):
1. Write a C program to evaluate the algebraic expression (if X = 1, print out an error
message):
2.
Experiment 5
Scientific Problem Solving using Decision Making and Looping
Aim:
To write a C program to demonstrate the use of decision making statements, looping
statements, and expressions.
Concepts Involved:
Decision Making
Programs should be able to make logical (true/false) decisions based on the condition
they are in;
An if statement consists of a Boolean expression followed by one or more statements.
Syntax: if(Boolean Expression) {
Statements;
}
Eg: if (x>10)
printf(Greater than 10);
The if....else statement is an extension of the simple if statement.
Syntax: if(Boolean Expression) {
Statements; }
else{
Statements;
}
Eg: if (x>10)
printf(Greater than 10);
else
printf(Not Greater than 10);
Syntax for Nesting of if else statements
if(Boolean Expression 1)
{
if(Boolean Expression 2){
statements; }
else {
statements; }
}
73
else{
statements;}
Eg: Find Maximum of three numbers a, b and c
if(a>b)
{
if(a>c)
printf(A is greater);
else
printf(C is greater);
}
else
{
if(b>c)
printf(B is Greater);
else
printf(C is Greater);
}
statements;
break;
.
.
.
default: statements;
break;
}
Eg: Print day for number
switch(n)
{
case 0:
printf(Sunday);
break;
case 1:
printf(Monday);
break;
case 2:
printf(Tuesday);
break;
case 3:
printf(Wednesday);
break;
case 4:
printf(Thursday);
break;
case 5:
printf(Friday);
break;
case 6:
printf(Saturday);
break;
default:
printf(Not a valid number);
break;
}
Looping
Loops are used to execute a set of statements repeatedly until a particular condition is
satisfied.
There are three types of loops. while, do-while and for loop
while loop: The while loop allows for the repeated execution of a group of statements as long as
a condition is true. The condition is checked each time before the code is executed.
Syntax: while (condition) {
75
Statements; }
Eg: To print Hello 10 times
while (i < 10)
{
printf(Hello\n);
i++;
}
do...while loop is similar to a while loop, except that a do...while loop is guaranteed to execute at
least one time.
Syntax: do {
statements;
} while(condition);
Eg: To print Hello 10 times this prints atleast once even if condition is not satisfied
do {
printf(Hello\n);
i++;
} while (i < 10);
for loops from one number to another number and increases by a specified value each time.
Syntax: for(initialization ; conditional ; increment/decrement)
{
statements; }
In Lab Exercises:
1. Write a C program to simulate a calculator using switch statement.
2. Write a C program to convert a given decimal number to hexadecimal?
3. Write a C program to check whether a blood donor is eligible or not for donating blood.
The conditions laid down are as under. Use if statement.
(a). Age should be above 18 years but not more than 55 years.
(b). Weight should be more than 45 kg.
76
4. Write a C program to calculate bill for Internet Browsing. The conditions are given
below.
(a). 1 Hour 20 Rs.
(b). Hour 10 Rs.
(c). 12 Hours 90 Rs.
5. Write a C program to calculate the sum of remainders of numbers 1 to 9 when divided by
2.
6. Write a C program to calculate sum of the first and last numbers from 1 to 10 (e.g. 1+10,
2+9, 3+8 sums should be always 11)
Viva Questions:
1.
2.
3.
4.
5.
6.
7.
8.
printf(%d, i);
}
2. How many times IndiaBIX is get printed?
#include<stdio.h>
int main()
{
int x;
for(x=1; x<=10; x++)
{
if(x<5)
continue;
else
break;
printf(IndiaBix);
}
return 0;
}
3. Point out the error in the following program.
#include<stdio.h>
int main()
{
int i=1;
while()
{
printf(%d\n, i++);
if(i>10)
break;
}
return 0;
}
4. Point out the error
#include<stdio.h>
int main()
{
int i=1;
switch(i)
{
case 1: printf(Case 1);
break;
case 1*2+4: printf(Case2);
break;
}
return 0;
}
78
79
Experiment 6
Simple Programming for 1D and 2D Arrays
Aim:
To write a C program to demonstrate the use of arrays, types of array and its declaration.
Concepts Involved:
C Array is a collection of variables belongings to the same data type. You can store group of data
of same data type in an array.
Array declaration
Array initialization
Accessing array
Syntax:
data_type
array_name
[array_size];
data_type
array_name
[array_size]=
(value 1, value 2,
value 3, .);
array_name[index];
is
age[0]; //
accessed
age[1]; //
accessed
age[2]; //
accessed
is
is
char
name[0];
//S
is
name[10]
80
{S, u, r,
n};
(or)
name [0] =
name [1] =
name [2] =
name [3] =
name [4] = n;
e,
accessed
name[1];
accessed
//u
is
S;
u;
r;
e;
Array declaration
Array initialization
Accessing
array
Syntax:
data_type
array_name[num_of_rows][num
_of_column];
data_type
array_name
[num_of_rows][num_of_columns]={
{1,2},{3,4}}}
array_name[i
ndex];
Example:
int arr[2][2];
arr [1][0]
3;
Accessing Array elements: An individual element of the array can be accessed by using the array
name followed by the element which is enclosed in square brackets. matrix[3][5];
In Lab Exercises:
1. Write a C program for searching a number from the given list using 1D Array.
81
Viva Questions:
1.
2.
3.
4.
5.
6.
7.
83
Experiment 7
Solving problems using String functions
Aim:
To write a C program to demonstrate the string manipulations.
Concepts Involved:
String is an array of character and it is terminated by null character /0.
Example for C string:
char string[20] = { f , r , e , s , h , 2 , r , e , f , r , e , s , h , \0}; (or)
char string[20] = fresh2refresh; (or)
char string []
= fresh2refresh;
Difference between above syntax is, in the declaration, char as string[20], 20 bytes of
memory space is allocated by the programmer for holding the string value. Whereas in string[],
any number of required space will be allocated during execution of the program.
String handling functions are
strlen(arg1) - This function takes arg1 as argument, counts and returns the number of
characters in it. Length always does not include a null character.
n=strlen(string); where n is an integer value.
strcpy(destn, source) It is used to copy source string to destination string
strcat() This function used to concatenate (join) the two strings. Consider
strcat(string1, string2) here, string1 & string2 are the character arrays. When the
function strcat is executed string2 is appended to the string1. The string at string2
always remains unchanged.
strcmp(s1, s2) It is used to compare two strings.
o If the first string is greater than the second string (lexicographically) then
a number greater than zero is returned.
o If the first string is less than the second string (lexicographically) then a
number less than zero is returned.
o If the first and the second string are equal then zero is returned.
strlwr(str) It will convert the string str to lowercase and returns lowercase letters.
strupr(str) It will convert the string to uppercase and returns uppercase letters.
String handling functions are defined under string.h header file. i.e you have to include
the code below to run string handling functions. #include<string.h>
In Lab Exercises:
1. Write a C program to enter some text through the keyboard. Insert dot (.) after every three
words in the text. The first character after every dot should be changed to capital.
2. Write a C program to encrypt the text in the following way. If input is INDIA, output
should be KPFKC.
3. Write a C program to sort a given set of names.
4. Write a C program that will analyze a line of text and will print the number of words, the
number of consonants and the number of vowels in the text.
Viva Questions:
1.
2.
3.
4.
5.
6.
7.
8.
#include<string.h>
int main()
{
char a[]=India;
char *p=BIX;
a=BIX;
p=India;
printf(%s %s\n,a,p);
return 0;
}
2. What will be the output of the program?
a. #include<stdio.h>
int main()
{
char p[]=%d\n;
p[1]=c;
printf(p,65);
return 0;
}
b. #include<stdio.h>
int main()
{
char str[] = Nagpur;
str[0] = K;
printf(%s, str);
str = Kanpur;
printf(%s,str+1);
return 0;
}
c. #include<stdio.h>
int main()
{
int i;
char a[ ]= \0;
if(printf(%s, a))
printf(the string is not empty\n);
else
printf(the string is empty\n);
return 0;
}
86
87
Experiment 8
Programs with user defined functions includes Parameter Passing
Aim:
To Write a C program to demonstrate the user defined function concepts, parameter
passing methods i.e., call by value and call by reference.
Concepts Involved:
The function is a self contained block of statements which performs a coherent task of a
same kind.
The functions which are created by user for program are known as 'User defined
functions'.
C Functions can be invoked from anywhere within a C program.
main() function is the function from where every C program is started to execute.
Name of the function is unique in a C program.
Syntax for defining user defined function:
//Function Prototype
<return type><function name> ([<argument list>]);
void main()
{
//Function Call
<function name>([<argument list>]);
}
//Function Definition
<return type><function name>([<argument list>])
{
<function body>;
}
Example:
int add (int a , int b)
{
int sum;
88
sum = a+b;
return sum;
}
Where,
Only one value can be returned. If you want to return more than one values, pointers can be used.
Call by value
Call by reference
Call By Value:
Call by value means passing the copy of the value to a function. The called function is
copied in a local variable; any changes to it do not affect the source variable.
Call By Reference:
Call by reference means passing the address of a variable where the actual value is stored.
The called function uses the value stored in the passed address; any changes to it do affect the
source variable.
Main function
add( a,b)
Function
add(x,y)
For examples: Call By Value: a and b value passed to x and y. If any changes made in x and y
means it will not affect the value of a and b.
Main function
add( &a,&b)
Function
add(*x,*y)
89
For example: Call by Reference: a and b pass its address to the x and y variable. If any changes
made in x and y means it will affect the value of a and b also.
Note: In the all the exercises below, be sure to use functions!
In Lab Exercises:
1. Write a function to calculate average of n numbers stored in an array. Get the numbers
and it to the functions.
2. Write a C program for adding two arrays of elements and display it in new array using
user defined function.
3. Write a C program for swapping of two values using call by value and call by reference.
4. Write a C program to interchange array elements of two arrays using a function.
5. Write a C program to add return values of three functions add(), multiply() and subtract().
Viva Questions:
1.
2.
3.
4.
5.
91
92
Experiment 9
Program using Recursive function
Aim:
To Write a C program to demonstrate the use of recursive functions.
Concepts Involved:
A function that calls itself is known as recursive function
For example:
find sum of first n natural numbers using recursion
int sum(int n);
int main()
{
int num,add;
printf("Enter a positive integer:\n");
scanf("%d",&num);
add=sum(num);
printf("sum=%d",add);
}
int sum(int n)
{
if(n==0)
return n;
else return n+sum(n-1); /*self call to function sum() */
}
Tracing
sum(5) =5+sum(4)
=5+4+sum(3)
=5+4+3+sum(2)
=5+4+3+2+sum(1)
=5+4+3+2+1+sum(0)
=5+4+3+2+1+0
=5+4+3+2+1
=5+4+3+3
93
=5+4+6
=5+10
=15
In Lab Exercises:
1. Write a C program for finding Factorial of a given number using recursion.
2. Write a C program to generate Fibonacci Series upto the given number using recursion.
3. Write a C program to determine GCD of a number using recursive function.
4. Write a C program to find the LCM of a number using recursion.
Viva Questions:
1.
2.
3.
4.
5.
6.
reverse(no);
return 0;
}
int reverse(int no)
{
if(no==0)
return 0;
else
printf(%d,no);
reverse(no--);
}
2. The five items : A, B, C, D and E are pushed in a stack, one after the other starting from
A. The stack is popped four times and each element is inserted in a queue. Then two
elements are deleted from the queue and pushed back on the stack. Now one item is
popped from the stack. The popped item is ?
95
Experiment 10
Programs using Structures and Unions
Aim:
To write a C program to demonstrate the use of structure concepts and unions.
Concepts Involved:
Structure is user defined data type which is used to store heterogeneous data under
unique name. Keyword 'struct' is used to declare structure.
The variables which are declared inside the structure are called as 'members of structure'.
All the members of a structure can be accessed at anytime.
Syntax for defining the structure:
struct structure_nm
{
<data-type> element 1;
<data-type> element 2;
--------------------<data-type> element n;
}struct_var;
Structure members can be accessed using member operator '.' . It is also called as 'dot
operator' or 'period operator'.
structure_var.member;
Union is user defined data type used to store a set of heterogeneous/ homogeneous data
under unique variable name at single memory location. Keyword union is used to
declare union.
The members of union can be accessed in similar manner as that structure. Suppose if
you are using pointer variable as a member then you can access the variable using
member operator i.e union_var member;
96
Typedef is a keyword that is used to give a new symbolic name for the existing name
in a C program.
In structure typedef means you no longer have to write struct all over the place.
For example:
typedef struct student
{
int mark [2];
char name [10];
float average;
}status;
structure variable declaration:
status record1;
//record 1 is structure variable
status record2;
//record 2 is structure variable
In Lab Exercises:
1. Write a C program to represent the details of student such as name, roll number, average
marks and their grade using structure.
2. Write a C program to display the different parameters of ten men in a table. The
parameters to be entered are height, weight, age, and chest in cm, Find the number of men
who satisfy the following condition:
(a). Age should be greater than 18 and less than 25.
(b). Height should be between 5.2 to 5.6 inches.
(c). Weight should be in between 45 to 60 kg.
(d). Chest should be greater than 45cm.
3. There are two employees in an industry namely regular and daily wages. Salary for regular
employees will be calculated using the formulae basic_pay + % of da * basic_pay+hra. Salary for
daily wages is calculated as no_of_hrs_worked * wages_per_hour. Create a structure to store
details of employees such as name, age, type of employment and salary details.
Viva Questions:
1.
2.
3.
4.
5.
98
99
Useful Links:
1. C Puzzles - http://www.gowrikumar.com/c/index.html
2. Programming Interview Questions http://www.gowrikumar.com/programming/index.html
3. The Best Answers to Tough Interview Questions http://www.gowrikumar.com/interview/index.html
http://cboard.cprogramming.com/c-programming/30984-cool-programs.html
http://www.cprogramming.com/tutorial/thinking.html
4. 8 Common Programming Mistakes http://www.cprogramming.com/tutorial/common.html
5. 5 Ways You can Learn Programming Faster http://www.cprogramming.com/how_to_learn_to_program.html
http://nms.csail.mit.edu/papers/sigcomm13.pdf
http://www.cs.virginia.edu/~asb/teaching/cs101-fall05/index.html
http://www.cs.virginia.edu/~asb/teaching/cs101-fall05/labs/labs.html
http://cseweb.ucsd.edu/~ricko/CSE5A/HW5.pdf
http://www.ugrad.cs.ubc.ca/~cs101/current/project/course-project-2012W2.html
100
https://www.coursera.org/course/cs101
http://cseweb.ucsd.edu/~ricko/CSE5A/quizzes.html
101