Professional Documents
Culture Documents
General Announcements General Announcements: Programming & Data Structures Programming & Data Structures
General Announcements General Announcements: Programming & Data Structures Programming & Data Structures
Pallab Dasgupta
Professor, Dept. of Computer Sc. & Engg.,
Indian Institute of Technology Kharagpur
Books:
1. Programming with C (Second Edition)
Byron Gottfried, Third Edition, Schaum’s Outlines Series, Tata
McGraw--Hill, 2011
McGraw
2. Data structures
S. Lipschutz,
Lipschutz, Schaum’s Outline Series, Tata McGraw
McGraw--Hill, 2010
3. The C Programming Language
Brian W Kernighan, Dennis M Ritchie, Prentice Hall India
Many other books are available and may serve the same purpose
– End
End--semester 50%
• Class Test-
Test-1: Feb 2, 2011 (18:30 – 19:30)
• Class Test-
Test-2: March 30, 2011 (18:30 – 19:30)
Pallab Dasgupta
Professor, Dept. of Computer Sc. & Engg.,
Indian Institute of Technology Kharagpur
• Input Device
– Keyboard, Mouse, Scanner, Digital Camera
• Output Device
– Monitor, Printer
• Storage Peripherals
– Magnetic Disks: hard disk, floppy disk (obsolete)
• Allows direct (semi-
(semi-random) access
– Optical Disks: CDROM, CD-
CD-RW, DVD
• Allows direct (semi-
(semi-random) access
– Flash Memory: pen drives
• Allows direct access
– Magnetic Tape: DAT (obsolete)
• Only sequential access
• What is a program?
– Set of instructions for carrying out a specific task.
• C is quick running.
running.
• C is the basis for many other languages (Java, C++, awk, Perl).
• It may not feel like it but C is one of the easiest languages to learn.
Preprocessor
#include <stdio.h>
Comments are good
/* This program prints “Hello World” */
#include <stdio.h>
/* This program
prints “Hello
World” Both of these programs are exactly
*/ the same as the original as far as
int your compiler is concerned.
main( )
{
printf(“Hello
World!
\n”)
;
}
! # % ^ & * ( )
- _ + = ~ [ ] \
| ; : ‘ “ { } ,
. < > / ? blank
n++ increment n
n-- decrement n
• Two categories:
1. Application Software
• Used to solve a particular problem.
• Editor, financial accounting, weather forecasting, etc.
2. System Software
• Helps in running other programs.
• Compiler, operating system, etc.
• Machine Language
– Expressed in binary.
– Directly understood by the computer.
– Not portable; varies from one machine type to another.
• Program written for one type of machine will not run on another
type of machine.
– Difficult to use in writing programs.
• Assembly Language
– Mnemonic form of machine language.
– Easier to use as compared to machine language.
• For example, use “ADD” instead of “10110100”.
– Not portable (like machine language).
– Requires a translator program called assembler
assembler..
Assembly Machine
language Assembler language
program program
HLL
Program
Libraries
• Question:
– How multiple users can work on the same computer?