Sie sind auf Seite 1von 30

CS101:Introductionto Computing

Dr.A.Sahu DeptofComp.Sc.&Engg. Dept of Comp. Sc. & Engg. IndianInstituteofTechnologyGuwahati


1

Outline
Course Attendance Reference Book Course,Attendance,ReferenceBook
CS101:Theory CS110:Laboratorywork

Wh t d Whatdowestudyinthiscourse? t d i thi ? Why should this be studied? Whyshouldthisbestudied? Howisthecoursestructured?


2

CS101(TheoryPart) CS101 (Theory Part)


Instructors:
G.Sagith,Ashish Anand,Amit Awekar, A.Sahu A Sahu

75%AttendanceisMandatory Twoexamandtwoquiz
Mid semester : 35% Midsemester:35% Endsemester:55% Quiz:10% i %
3

CS101:CourseStructure
Introduction:OS,compiler,texteditors, flowchartandsystem; flowchart and system; g g CProgramming:Basicfeaturesand
Advancedfeatures

Data Structures: array stack queue DataStructures:array,stack,queue, lists Searchingandsorting Intro.toobjectorientedprogramming b d


4

CS101:Text&References CS101: Text & References


TextBook
AKellyandIPohl,ABookonC,4/e,Pearson Education,1999 AMTenenbaum andall,DataStructures UsingC,PrenticeHallIndia,1996.. References
HSchildt,C:TheCompleteReference,4/e,Tata , p f , / , Mcgraw Hill,2000 BKernighanandDRitchie,TheCProgramming Language,2/e,PrenticeHallofIndia,1988.
5

Web,timing,venue , g,
Coursewebsite:

http://jatinga.iitg.ernet.in/~cs110/ http://jatinga iitg ernet in/~cs110/


ClassTiming&Venue Venue:L3 Timing : Slot A (Division II) Timing:SlotA(DivisionII)
Tue:910,Wed:1011andThu:1112, Mon8Am9AMismakeupslot Mon 8Am 9AM is make up slot

Timing:SlotA1(DivisionI)
T 4 5PM W d 3 4PM d Th 2 3PM Tue:45PM,Wed:34PMandThu:23PM Mon:56PMismakeupslot
6

CS110(LabPart) CS110 (Lab Part)


http://jatinga.iitg.ernet.in/~cs110/ p //j g g / / Venue:ComputerCenter TA ill h l TAswillhelpsandOneFacultywill dO F l ill guide/superviseyouinCCLaboratory Marks:
PracticeProblem:30% Practice Problem :30% Midsemester:30% Endsemester:40%
7

CS110(LabPart) CS110 (Lab Part)


AssumeEverylabclassisExamination
Everyweekonpracticeproblem Everypracticeproblemcarriesmarks:3 Every practice problem carries marks : 3 Marks P ti Practiceproblem:Serveasattendance bl S tt d Copycase:NegativeMarks
(ifcreditis3,copycase3)

A Set of Practice Problems will be ASetofPracticeProblemswillbe announcedbeforeLabsessionstart.

CS101CourseObjectives CS101 Course Objectives


Tolearn To learn
Basicprincipleofcomputersystemand programming i Useofcomputerformanyreallife problem
Physics,Chemistry,Electrical,Mechanical

Programmingremove:Manymanual calculation
9

CS101:Course CS101 : Course


ComputerSystem C Programming CProgramming AdvancedCProgramming g g D t St t DataStructure&Sortingand & S ti d Searching
10

CS101:CourseFlow CS101 : Course Flow


Computer Computer System C Programming AdvancedC Programming
DataStructure & Sorting/Searching

11

WhatIsAComputer? What Is A Computer?


An electronic device Operates under control of d l f (software) Stored in its own memory unit It can instructions

Accept data (input), Manipulate data (process), Produce output from the processing.

A collection of devices that function together as a system.


12

ComputerSystem p y
I/P

Processing

O/P

Keyboard,Mouse:Input Speaker,Monitor/Display:Output CPUBox:Processing

13

ComputerSystem:VonNewman
Memory

I/P

Processing

O/P

InputandOutput Processing Memory:Whereitstore


Instruction Data Intermediate compute Instruction,Data,Intermediatecompute
14

InsidePC:Motherboard

15

InsidePC:MemoryCard

16

InsidePC:HardDisk Inside PC : Hard Disk

17

InsidePC:Processor

18

ComputerSystem: WhenyouSwitchon h h
OperatingSystembootsfromHarddisk OS:Giveyouanenvironmentwhereyou work DifferentOS
WindowXP/Vista/7 Linux

Applicationcanbeinvokedbyclickingsome Icon Application:Word,Excel,InternetExplorer, Mozilla,MediaPlayer Mozilla Media Player


19

Screenshot:Window&Linux Screen shot : Window & Linux

Both are equally Good and Powerful BothareequallyGoodandPowerful Window:Userfriendly,pronetoVirus, Commercial(NotFree:youhavetoPayMoney) Commercial (Not Free: you have to Pay Money) Linux:RobustandFreelyavailable
20

ApplicationSoftware Application Software


Application Software consists of programs That tell a computer how to produce information. Some of the more commonly used packages are:
Word processing

Electronic spreadsheet Database Presentation graphics i hi


21

WordProcessing Word Processing


used to create and print usedtocreateandprint documents. Akeyadvantageofword y g processingsoftware y Userseasilycanmake changesindocuments.

22

ElectronicSpreadsheets Electronic Spreadsheets


Allows the user can do on Allowstheusercandoon rowsandcolumnsof numbers.
Add,Subtract,performuser definedcalculations

Thesenumberscanbe h b b changed A d th Andthespreadsheet dh t quicklyrecalculatesthe newresults. new results


23

DatabaseSoftware Database Software


Allows the user to Allowstheuserto enter,retrieve,and updatedata update data Inanorganizedand efficientmanner efficient manner Withflexibleinquiry andreporting d i capabilities.
24

PresentationGraphics Presentation Graphics


Allows the user to create Allowstheusertocreate documentsslidestobe usedinmakingthe presentations. Usingspecialprojection devicestoProject Slidesdisplayasthey appearonthecomputer h screen
25

Programming:Why,WhatandHow? Programming: Why, What and How ?


OperatingSystem:Linux,Window Applications:Word/Excel,MediaPlayer,Mozilla, / Explorer,etc
We se it to do some tasks but dont know inside Weuseittodosometasks,butdontknowinside contents

Programming
Purpose:tocreateaprogramthatperformsspecific operationsorexhibitsacertaindesiredbehavior. ComputerLanguage(C,C++,Java,Fortran,Cobol) Designourownapplication Al Almostfromthebeginning tf th b i i Understandinghowsoftware/applicationworks 26

Howtodoprogramming
Problem:Specification
Example:ComputesumofNNumber DefineInput{N},Output{SUM} Howtodo:Flowchart WritetheC/C++CodeinNote/Paper

OS,Shell/IDE,Editor:
Li Linux,BashShell,Gedit/VI/Pico B h Sh ll G di /VI/Pi WordProcessorisnotusedtowriteprogram TurboC/VisualC++/Kdevelop/Dev

Compiler:GCC,TCC,VCC Running: /a out Running:./a.out


27

Start

Start
InputN

FlowChart Flow Chart


Two methods Twomethods
Method1 Sum=1+2+3++N Sum= 1+2+3+ +N Method2 Sum=N(N+1)/2 S N(N+1)/2

InputN Initialize i=0;S=0 ; Intermediate Sum=Sum+i S S i Incrementi i=i+1

Sum=N*(N+1)/2

i<N
OutputS OutputS
28

End

End

28

CProgramminginLiunx Environment C Programming in Liunx Environment OS:Linux Editor:vi,pico,gedit C Compiler:GCC(GnuCompiler il GCC (G C il Collection) $vitest.c $gcc test.c $./a.out $ /a out
29

Thanks

30

Das könnte Ihnen auch gefallen