Name: Branch: Sec: Reg no:

UNIT – 1 Introduction  The term computer is derived from the word “Compute”.  Definition: A computer is an electronic device that takes data and instructions as “Input” from the user, “Processes” the data and provides useful information known as “Output”.  This cycle of operation of a computer is known as “Input-process-output” cycle. Key characteristics: Speed: Computer is a fast electronic device that can solve large and complex problems in few seconds. The speed depends upon the hardware configuration.  Storage capacity: Computer can store huge amount of data in multiple formats. The storage area is mainly divided into two categories: 1. Primary memory 2.Secondary memory.  Accuracy: Computer carries out calculations with great accuracy and it depends upon hardware configuration and instructions.  Reliability: Computer provides results with no error. Computer generated errors are human errors at specification.  Versatility: Since computers perform more no of varied tasks and can be used for many different purposes, they are said to be versatile.  Diligence :Computers can perform repetitive calculations any number of times with same level of accuracy APPLICATIONS:The application areas are broadly classified into the following categories:   

Data processing (commercial use ) Numerical computing (scientific use) Text(word) processing(office and educational use) Message communication(e-mail)

 Image processing(Animation and industrial use)  Voice recognition(multimedia) COMPUTER SYSTEMS: Computer system mainly consists of “Hardware” and “Software” components.  Hardware: - It refers to the physical parts of the computer system.  Software:-It refers to set of instructions (or) programs that are necessary to perform the tasks.  Hardware includes the following components: Input devices.  Processor.  Output devices.  Memory.  Software supports the functionality of the computer system internally and cannot be seen.  This software is stored on secondary memory  This software is divided into two categories: Application software: - It is used to perform a specific task according to the requirements.  System software: - It resides inside the secondary memory and is mandatory for running application software. Examples: - 1. As: - Ms word, Ms Excel. 2. Ss: - Os, Networking system.  All the hardware components interact with each other as well as with software.  The interaction between various hardware components is shown in the figure below Let us have a detailed look on the hardware components: Input devices:The most commonly used input devices are:  Keyboard  Mouse  Scanner

1. Keyboard:- a standard keyboard includes I. Alphanumeric keys:- these keys include the number keys and alphabet keys II. Function keys:- these keys help to perform a specific task III. Modifier keys:- these keys such as ctrl and shift keys modify the casing style of character or symbol IV. Cursor movement keys:- these are arrow keys are used to modify the direction of cursor on screen V. Space bar:- this key shifts the cursor to right by one position VI. Escape key: - this key is used to come out of certain running application by terminating it. VII. Numeric keypad:- this keypad is used for mathematical calculations VIII. Page up:- move the cursor to go from bottom to top of total page IX. Page down: - moves total page down till last page. X. Home: - to get home page. XI. Insert,Delete,End:- manipulation keys

2. Mouse:I. It is known as pointing device. Which allows the user to select the elements on the screen or button clicking II. Mouse consists of two buttons, a wheel at top and a ball at bottom. III. The down ball specifies the cursor movement on the screen. IV. The top ball is used to scroll down a document or web page. V. Left button is used to select an element. VI. Right button displays special actions such as open, rename, copy, move, send to, etc…. 3. Scanner: I. It is an input device that converts documents and images as digitalized information understandable by the computer for its storage. II. The images after digitalization can be black/white, Gray, Color. III. In case of color images: - The proportions of Red, Green and Blue assigned to a dot called as “Color description” is used. Types of scanners: i.

Flat bed scanner: - It has scanner head that moves across page from top to bottom to read the page. It is used to scan Graphics, Oversized documents.

ii.

Drum scanner: - it has fixed scanner head and the image is moved across head. It is used to scan pre press material. iii. Slide scanner: - It can scan photographic slides directly to produce files in digitalized form. iv. Hand-Held scanner: - It is used by the user to move the scanner for the page to be scanned. It is inexpensive and small E.g.: Barcode scanner.  Processor: CPU consists of control unit (cu) and ALU.  Control unit (cu):  Cu store the information set, which specifies the operations.  Cu transfers data and instructions to ALU for an arithmetic operation.  Arithmetic Logical Unit (ALU):  ALU performs both arithmetical and logical operations on the data received. Apart from CU and ALU the CPU seeks helps from these hardware devices:  Mother Board:  This board is used for connecting the CPU with input and output devices.  Some of the components of mother board are:  Buses: - These are the electrical pathways that transfer data and instructions among different parts of computer. i. Data bus: - transfers data among the micro processor, memory and input/output devices connected to computer. ii. Address bus: - transfers addresses among microprocessor, RAM and ROM.  System clock: i. It is a clock used for synchronizing the activities performed by the computer. ii. The electrical signals passed inside the computer are timed based on the tick of the clock. iii. The faster the system clock, faster is processing speed of the computer.  Microprocessor: - The component that performs the processing and controls the activities performed by different parts of computer.

 ROM: - A chip that contains permanent memory that stores information, which cannot be modified by end user.  RAM: - A chip that contains temporary memory which vanishes when power loss.  Video card: - It is an interface between monitor and CPU. They include their own ram and processors for speed up the processing display of graphic.  Sound card: - This card is used to enhance the sound capabilities and is an interface between speakers and CPU.  Peripheral component interconnect (PCI): - Both video card and soundcard are plugged to pci. It also enables the connection of internet interface card, modem cards and video cards. 1. Output Devices: The most commonly used output devices are: - 1. Monitor 2. Printer 3. Speakers 4. Plotters  Monitor:  The monitor also known as screen is the display device used for visual presentation of textual and graphical information.  Monitors are classified into two types: i. Cathode ray tube (CRT)  They are large, occupy more space.  They are available as monochrome, grays and color models. ii. Liquid crystal display (LCD)  They are thin, light weighted and occupy less space.  They are also available in all models. Quality of visual display of LCD is better than CRT.  Characteristics: I. Size: - The monitor size is length of screen measured diagonally.

II.

Resolution: - it is expressed as no of “picture elements” or “pixels” of screen. It is also called as dot pitch. Monitor with high resolution produces clear image.

 Printer:  It is an output device used to produce “hard copy” of the electronic text displayed on the screen in the form of paper sheets for end user.  It is stored in the form of file in the computer; it is called “soft copy”.  “Printer driver software” is used to convert the document into the form understandable by the computer.  The performance of a printer is measured in terms of “dots per inch (dpi)” and “pages per minute (ppm)”.  The greater the dpi, the higher quality the output.  Ppm represents higher efficiency of a printer.  Printers can be classified based on printing technology  Dot matrix printers: - these use perforated sheet and printing involves striking a pin against a ribbon.  Ink jet printers: - These are slower than dot-matrix printers. The ink cartridges are attached to printer head that moves horizontally from left to right.  Laser printers: - These printers consist of microprocessor, ram, and rom for storage textual information.  The printer uses cylindrical drum a toner and laser beam.  Speakers:  The speaker is an electromechanical transducer that converts an electrical signal into sound.  The audio drivers need to be installed in the computer system to produce audio output.  The sound card used in computer decides the quality of audio.  Plotter:  The plotter is an output device to print large documents, such as engineering (or) constructional drawings.  Plotters use multiple ink pens (or) inkjets with color cartridges for printing.  A computer transmits binary signals to all print heads of plotter.  Plotters are classified on the basis of their performance: I. Drum plotter: - They are used to draw perfect circles and other graphic images. They use a drawing arm to

II.

III.

IV.

draw the image. The drum plotter moves the paper back and forth through a roller and the drawing arm moves across paper. Flat-Bed plotter: - It has flat drawing surface and two drawing arms that move across the paper sheet, drawing an image. It has low speed of printing and large in size. Ink-Jet plotter: - Spray nozzles are used to generate images for spraying droplets of ink onto paper. High maintenance cost. Electrostatic plotter: - It uses charged electric wires and special di-electric paper for drawing. It produces quality print with high speed.

 Memory:  Memory unit is used to store data and instructions for processing, intermediate results of processing and final processed information.  The above figure shows the memory organization in a computer system.  Primary Memory:  Primary memory is available in the computer as builtin-unit of the computer.  It is represented as set of locations with each location occupying 8 bits.  Each bit in memory is identified by a unique address.  Data is stored in machine understandable binary form. The commonly used primary memories are:  ROM:  It represents “Read only memory”.

 It is “permanent storage memory” and it is said to be “non-volatile” memory means stores the data even power is turned off.  It is inserted into mother board.  It is generally used to store basic input/output system (BIOS) which performs power on self test (POST).  RAM:  It represents “Random access memory”.  It is volatile memory i.e., information is retained only as long as there is regular power supply otherwise it will be lost.  Cache Memory:  Cache memory is used to store the data related to application that was last processed by ALU(processor)  It is always placed between processor and main memory of the system.  When the processor is processing, it checks for the cache memory and then RAM, if not available it goes to hard disk.

The main differences of RAM and ROM are  Secondary memory:  It represents external storage device connected to computer.  It is non-volatile memory storage.  It is either located in CPU case or connected externally. These devices are classified as: -

I.

Magnetic storage device: - These devices store information that can be read, erased, and re-written no of times. E.G.: floppy, hard disk, magnetic tapes etc… II. Optical storage devices: These devices use laser beam to read the stored data. E.G.: Cd-rom, cd-rw and DVD. III. Magneto-optical storage device: -These devices generally used to store information such as large programs, files and backup data. These devices use laser beam and magnets to read/write to device. They provide high storage capacity. IV. Universal serial bus (usb): -It is a removable storage device commonly known as “Pen drive” connected to pci of mother board. It is very fast and of little size compared to cd & floppy and it is expensive than cd & floppy and had high storage capacity.  Internal processor memory is discussed after “Generation of computers”. PROGRAMMING LAUNGUAGES:  Operations of a computer are controlled by set of instructions (computer program).  They are written to tell:  What operation to perform  Where to locate data.  How to give output.  When to make decisions.  3 levels of programming languages are available. They are: I. Machine Language (low level language). II. Assembly (symbolic) languages. III. Procedure oriented (High level) languages. 1) Machine language:  As computers are electronic devices, they have only two states Pulse and No-pulse.  These are assigned pulse (1) and no-pulse (0) conditions.

2)

3)

I.    

 Therefore all instructions and data should be written in this “Binary code” also called as “Machine code”.  This language is usually referred as “First Generation language”. Disadvantages:  Highly difficult to program and memorize.  Difficult to communicate. Assembly language:  It is also referred as “Symbolic language” (or) “second generation language”.  In this language, the set of 0’s and 1’s of machine language are replaced with “Abbreviations” (or) “Mnemonics”.  In this the program consists of set of instructions and mnemonics correspond to stream of executable instructions.  The mnemonic code is also called as “Operation code” (or) “Opcode”.  During execution, Assembly language program is converted into machine code through software called “Assembler”. Advantages:  As we can locate and identify syntax errors. It is easy to debug.  Easy to develop a program compared to machine language.  Operates very efficiently. Disadvantages:  One should have total command on instruction set of program.  Time taking process to program. High level language:  These languages further simplified by reducing no of computer operation details to be specified.  These can be classified into 3 categories:  Procedure oriented languages.  Problem Oriented languages.  Natural languages. Procedure oriented languages: Hll designed to solve general purpose problems. These are also called as “Third generation languages”. These are like English like commands. These are highly portable (when provided compiler & interpreter on any computer)

 These are considered as domain specified languages as they as designed to develop software applications for specific field. II. Problem oriented languages:  These are also called as “Fourth generation languages”.  These are developed to solve specific problems.  These languages include query languages, application generation, report generators which have simple syntax rules?  The reduced overall cost for software development.  These languages use either virtual environment or textual environment for program development.  Graphical user interface (GUI) components such as icons, buttons, textboxes etc., used for program development.  These languages are typically used in what you see is what to get (WYS/WYD) Environment.

III.

Natural languages:  These languages make a computer to behave like an expert and solve problems.  These are widely known as Fifth generation languages”.  EG: languages such as LISP and PROLOG are used to develop artificial intelligence and expert systems.  These languages are mainly focused on constraint programming.

Programming Environment:  It comprises all those components that facilitate the development of program.  These components are divided as two categories: 1. Programming tools 2. Application programming interfaces(Api):  These are building blocks of programming environment. 1. Api: » It is defined as collection of data structures, classes, protocols and predefined functions stored in the form of libraries. » These are included in software packages of programming languages. » They provide reusability. 2. programming tools: -

» Software application used for development, maintenance, and debugging of software program is known as programming tool. » These tools ensure efficiency. Main categories of programming tools: 1) Integrated development environment (ide): » The most commonly used tools that offer an environment for software development. » It contains all components for software development such as compiler, editor, debugger etc., 2) Debugging tool: -it helps the programmer to detect and remove bugs or errors from a program. 3) Memory usage tool: - it helps the programmer to manage the memory resources in an efficient manner. Structured programming: - procedure oriented programming i.e., third generation programming languages are categorized into 2 types.

1. Structural programming: » It helps in making a program easily understandable and debug. » It mainly focuses on the order of execution of statements within a program. » It suggests the use of three types of control structures sequential, repetitive and selective. System development tools: » Successful development and execution of program requires usage of no of tools. » Some of the tools are : 1. Language translators. 2. Linkers. 3. Debuggers. 4. Editors. 1. Language translators. 1) Assembler: » It is a computer program that translates assembly languages statements into machine language codes.

» The output of the assembler is in the form of sequence of 0’s and 1’s is called “object code” (or) “machine code”. » This object code is finally executed to obtain results. 2) Compiler: » It is a computer program that translates to source code written in Hll into corresponding object code of low level language. » This translation process is called compilation. 3) Interpreter: » The interpreter is a translation program that converts each high level program statement into machine code. » Instead of entire program, only one statement at a time is translated and executed immediately.  Assemblers are classified as single pass assemblers and two pass assemblers. 1. Single pass assembler: - it processes the source code once to replace the mnemonics with binary code. 2. Two pass assembler: » These assemblers read the program twice. » During first pass, all the variables and the labels are read and placed onto the symbol table. » During second pass, the label gaps are filled from the table by replacing the label name with address.  Compilers are also classified into 2 types: 1) Single pass compilers. 2) Multi pass compilers. 1. Linkers: » It assembles various object codes of different modules generated by the compiler in such a manner that all object codes are combined to form a single program at the time of execution. » It also attaches the library functions to the object code modules.

Debugger: » It locates the position of errors with the help of ISS (instruction set simulator) technique. » ISS is capable of stopping the execution of a program where an error occurred. » It is divided into two types: 1) Machine level debugger: - it debugs the object code of the program and shows all the lines where bugs are detected. 2) Symbolic debugger: -it debugs the original code i.e., HLL code of program. » In order to debug the program it performs: 1) Step by step execution of a program. 2) Back tracking for checking previous steps. 3) Stopping execution until all errors is corrected.

Editors: » It is used for the documentation purpose and enables us to do us some editing operations such as copy, cut, paste for information present in the existing document (or) file. » Basis on content, editors are divided into categories: 1. Text edition: -it is used to edit plain text. 2. Digital audio editor: - it is used to edit information related to audio applications where editing music and sound signals are necessary. 3. Graphics editor: - it is used to edit information related to graphical objects generally used in multimedia applications. 4. Binary file editor: - it is used to edit digital data (or) binary data. 5. HTML editor: - it is used to edit information included in web pages. 6. Source code editor: - it is used to edit the source code of a program written in c, c++, java etc., Developing a program: » A programming language is typically bundled together with an ide containing necessary tools for developing, editing, running and debugging computer program. » For example: IDE for c is turbo c which is a strong and powerful tool to execute the programs from developing stage.

» After developing the next step is to compilation, which helps to identify any syntactical errors in the program. » If no syntax errors, then compiler generates target object code. » Once the object code is build is, program is sum to check the logical correctness of the program and generate desired output. » If the output generated by the program for given inputs matches the desired result, the purpose of developing the program is saved. » Otherwise logic of the program is checked again to obtain correct solution. » In turbo c for compilation press “ALT+F9” and for execution press “CTRL+F9”. Problem solving: » It is the process of solving a problem in a computer by following sequence of steps: 1) Developing an algorithm: - algorithm is a sequence of steps written in English language to specify the tasks for solving the problem. 2) Drawing the flowchart: - flow chart is a pictorial representation of flow of control and logic in the solution. It is also called as graphical representation. 3) Writing pseudo code: - it is similar to algorithm. It uses generic syntax for describing steps to be performed for solving problem. 1. Algorithm: » It helps programmer in breaking down the solution into no of sequential steps. » There is “time complexity” and “space complexity” associated with each algorithm. » Time complexity: - it specifies the amount of time required by an algorithm for performing desired task. » Space complexity: -it specifies the amount of memory space required by an algorithm for performing desired task.

Characteristics: » » » » »

Instructions should be in ordered form. Instructions must be simple and concise. They must not be ambiguous. There must be an instruction for program termination. Repetitive programming constructs should posses exist condition without running infinitely. » Algorithm must completely and definitely solve the problem.

Advantages: » It provides care solution which can be implemented using any programming language. » It is used as design document/blueprint for given problem solution. » Easy understanding of problem. » Easy identification and removal of logical errors. » Facilities analysis to find efficient solution. Disadvantages: » In large algorithms, flow of control is difficult to track. » It lack of visual representation of programming constructs so, understanding logic is difficult. Example: Write an algorithm to find the sum of two numbers. Step 1:- start Step 2:- accept two numbers from user Step 3:- calculate sum by adding two numbers Sum=num1+num2 Step 4:- display the sum Step 5:- stop 2. Flow charts: » It is defined as pictorial representation, which describe the sequence and flow of control and information within the process in step by step form. » It uses different symbols for depicting different activities: 1) Basic symbols:  Start and end: » It is represented as an “oral” (or) a rounded rectangle. » It represents the starting and ending of a process.  Input (or) output: -

» It is represented by “parallelogram”. » It represents inputs taken by the user to the process and outputs given by the process to the user.  Action (or) process: » It is represented by “rectangle”. » It represents actions, logic and calculation takes place in this process.  Decision (or) condition: » It is represented by rhombus. » It represents condition or decision making step in flow chart. » Result of decision is a Boolean value either true or false.  Arrow: » It is represented by directed line. » It gives or represents the direction of flow of control from step to step of the process.  Connector: » It is represented by a circle in flow chart. » It represents continuation of flow of steps when flow chart continues to next page. » A character such as alphabet or a symbol is placed in the circle where flow is broken and same symbol is placed in the circle where it continuous again. a 2) Special symbols for depicting advanced operations: a. Represents internal memory of the computer b system eg. Ram, rom. b. Represents a database. c c. Represents subroutine. d

e

d. Represents set of documents. e. Represents idle (or) waiting f state. f. Merge multiple sets into one. g. Extract individual sets of data items from single set. h. Represents combination of merge and extract actions.

g

h

Flow chart design rules: » » » » » »

It must begin with start and end with a stop symbol. Standard process flow should be from top to bottom or from left to right. Instructions specified in symbols must be crisp and concise. Arrows to be aligned properly to depict program control Uses of connectors are generally avoided. “Process or action” symbol must have only one input arrow and one output arrow. » Two arrows should never intersect each other, if such a case arises; “bridge or crossover” symbols are used. Advantages: » » » » »

Easy understanding of flow of program control. Easy development of program code through flow chart. Helps in avoiding semantic (meaning of instruction errors). Since it is pictorial, easy understanding of programming logic. Use of flowchart works well for small program design.

Disadvantages: » Large programs, flow charts are complex and confusing. » Modification of flowchart is difficult and almost, it is entire rework. » Since it is a pictorial representation, it is tedious and time consuming to create flowchart.

» Excessive uses of connectors lead to confusion. Example: Draw a flow chart for finding sum of two numbers. 3. Pseudo codes: » It is a combination of generic syntax and normal English language. » It helps the programmer understand the basic logic of the program. Pseudo code rules: » Generic syntax (or) operation code must be kept all capitalized. » The end looping and

declaration making constructs must be labeled appropriately with “End” keyword. » Complex instructions must be avoided by writing simple and clear instructions. Advantages: » » » »

Easy to understand. Developing pseudo code than from flow chart (or) scratch. These are easier to modify than in flow chart. It works well for large program design.

Disadvantages: » Since it don’t have pictorial representation, it is too difficult for understanding logic.

» No standard format for pseudo code, so it might not be used by different programmers. » Flow of program control cannot be understandable. » Examples: 1.write the pseudo code for finding the sum of two numbers. BEGIN DEFINE: integer num1, num2, sum READ: integer num1 READ: integer num2 COMPUTE: sum=num1+num2 DISPLAY: sum Program development steps: The steps involved in the program development are: 1) 2) 3) 4) 5) 6) 7)

Understand the problem Examine the data Plan the output Designing the solution Selecting test data. Actual coding Testing

1. Understanding the problem: - unless the problem is clearly understood, we cannot even begin to solve it. So it is needed to be identified first. 2. Examine the data: - Programs are written to work on data without knowing organization of data, the program which process it cannot be written. 3. Planning the output: -The output should be planned next. It helps to get a clear picture of what the program is trying to achieve. 4. Designing the solution: - there are many ways of designing the solutions. It is only after a long planning period and the most effective order of such tasks is agreed upon that the construction crew actually begins the work. The end result standing or falling by the amount of case and attention invested in planning stage. 5. Selecting test data: - try the program out on some data to which the answers have been worked out in advance. If they match, the program should be all right. 6. The actual coding: -At this stage, one can begin to code the detailed program designers, into program instructions of given language. The chances are high that

fairly successful program will result. Although it may still contain bugs (errors). These are fever and reliability easy to identify and correct. 7. Testing: -The program can be tested with the test data, results checked and any errors corrected, when all instructions are correct, program can be released and set to work on live data. Bits, Bytes and words: » » » » »

A “bit” is the smallest unit of information i.e., either 0or 1 The size of memory is specified in terms of “bytes”. A “byte” is made of “8 bits”. A “word” is formed of “4 bytes (2 or more bytes). The basic information unit of a computer is called “word”.

Binary codes:  In computer code conversion is not much suitable for performing input output operations.  To overcome this disadvantage, binary codes were introduced.  The binary codes can be broadly classified into two types: 1) Numeric codes: - when 0-9 decimal are coded in binary digits using a sequence of 0’s and 1’s, the system is called as “Numeric coding system”. BCD is the best example for numeric codes. 2) Alpha-Numeric codes: - when 0-9 decimal digits, A-Z English upper case letters, a-z English lower case letters, (+,-,*,/,^,% etc., ) arithmetic operators;, < >,>=,<=,==,|= etc, relation operators( “ , . , , , : , ; , ’) etc., separators ;,[],{},() etc., parenthesis: Ctrl, Alt, etc., special characters are given by codes in binary using 0’s and 1’s. Then the coding system can be called as alphanumeric coding system. The relevant examples for alphanumeric coding system are:

i. ii.

iii.

ASCII (American standard code for information interchange): it is a 7-bit code and ranges from 0 to 127. EBCDIC (Extended binary coded decimal interchange): it is an 8-bit code. The major application of binary codes is input, output and storage operations. UNICODE: it defines a fully international character set that can represent all the characters found in all human languages. It is a unification of dozens of character sets such as Latin, Greek, Arabic, Cyrillic etc., generally Unicode characters are represented by escape sequences. It is 16 bit code; it ranges from 0 to 65,536.

Classification of computers: 1. Analog computers:  These computers use analog signals for its operation.  These computers work on the basic principle of measuring of signal.  These computers are very accurate, but cost increases directly in proportion to its accuracy. E.g.: speedometer. 2. Digital computers:  These computers work with digital signal.  These work on 0’s and 1’s.  The basic principle is counting of digits.  These computer exhibit both the good features such as industrial automation etc., Types of digital computers: 1. Super computers:  These are powerful computers and have the capability of around 64 main frame computers.  At a time 120 users can interact with it.  These are generally used for weather forecasting, missile firing, satellite launching etc.,  These are also called as maxi computers (or) monster. 2. Main frame computers:  It is large computer having the capability of around 16 mini computers.  At a time 64 users can interact with these computers.

 These are generally used in business and scientific applications and commonly used for weather forecasting.  These computers are also called as “midi computer”. 3. Minicomputer:  It is 16 times faster than a micro computer.  At a time 12 users can interact with these computers.  These are commonly used for business and scientific applications. 4. Micro computers:  This is the smallest computer, which uses micro processor as its CPU.  This is also called as personal computer can interact with single user.  These computers are inexpensive and popular.  A micro computer will be used for industrial, business and scientific applications.  These are classified into pc’s, pc-xt’s (personal computer advanced technology) and pc-at’s (personal computer advanced technology).  Pc’s & pc-xt’s support single user, where as pc-at’s support multiuser with speed of >=12 mhz. whereas speed of pc’s & pc-xt’s is of 8 MHz. Generation of computers:  The ‘abacus’ was invented around 2500Bc.  It is a device made up of beads strung on roads and is used to perform simple computations.  Napier invented a device for computing algorithms of natural numbers.  It was called as “Napier bones” and enabled multiplication to be done easily.  Blaise Pascal invented the adding machine in 1642 A.D.  Charles Babbage designed the difference engine in 1822 AD and analytical engine in1833 AD.  Herman Hollerith built a tabulating machine in 1890 A.D. used in the census of the US in 1890 A.D. Computers can be classified into five generations: In UNIX system: -

1. Creating the program: - the program should be written in text editor either in “ed” (or) “vi” and should be saved as a file with “.c” extension. The command for calling the editor and creating file is syn: - ed filename e.g.: ed hello.c 2. Compiling & Linking: - the compilation command under UNIX is cc filename e.g.: cc hello.c. After compilation, if no errors it creates an object code with (.o) extension as hello.o. By the ‘cc’ command in UNIX, linking is automatically done, if no errors found. The compiled and linked program is called “executable code” is stored in another file name automatically in UNIX called “a.out”. 3. Execution: - the simple command ‘a.out’ will execute the program instructions. If we have multiple source files, we can append the entire file name to “cc” command. Syn: cc filename1.c----------filenamen.c. In ms-dos system: 1. Creating the program: - the program is created using any word processing software in non-document mode and should be saved with ‘.c’ extension. E.g. pay.c. 2. Compiling: - the command “MSC pay.c” would load the program from ‘pay.c’ and create object code and is stored in another file name called “pay.obj”. If any errors found, the program should be again corrected and completed, otherwise compilation is not completed. 3. Linking: - it is done by the command link pay.obj which generates “executable code” with file name “pay.exe”. 4. Execution: - now the command “pay” would execute the program and give results. Computer generations: 1. Generation: Zero Year: pre 1946 Representative computers: Abacus, Difference engine, analytical engine. Hardware: counter wheels with mechanical components. Software: ---Performance: Numerical operations at slow speed. 2. Generation: first Year: 1946-1956 Representative computers: ENIAC, EDVAC, UNIVAC, IBM 650. Hardware: vacuum tubes, magnetic drum, CRT screen.

Software: stored program, machine code. Performance: 2kb memory, 10 kilo instructions per second (KIPS) 3. Generation: second Year: 1957-1963 Representative computers: IBM 7094, CDC 6600, Honeywell 400, Burraghs 5000. Hardware: Transistor, Magnetic core memory. Software: HLL, FORTRAN, COBOL, ALGOL. Performance: 32 kb memory, 5 million instructions per second (MIPS). 4. Generation: Third Year: 1964-1981 Representative computers: IBM 360/370, Honeywell 2000, CRAY-1, CYBER 205. Hardware: (IC’s), Semi-conductor memory, magnetic disk, micro and mini computers. Software: Pascal, c computer graphics, os, time sharing systems. Performance: 2mb memory, 5 million instruction per second (MIPS). 5. Generation: fourth Year: 1982-1989 Representative computers: CRAY-XMP, IBM 305. Hardware: Distributed computing system, VLSI, Bubble memory, Optical disk. Software: Wide spread use of packaged s/w, oop languages, c++, small talk. Performance: 8mb memory, 30 million instructions per second (MIPS). 6. Generation: fifth Year: 1990Representative computers: Distributed computing, PARAM 9000, C-DAC, INDIA, CRAY-2, Cray corporation. Hardware: Advanced packaging and integration technology, parallel arc 3D-IC design, optical & neutral computing. Software: Java, concurrent languages, object oriented, os and systems, multiprocessing, multi tasking, multi threading. Performance: 1 giga to 1 terra instructions per second. Internal processor memory: -

Cache memory: - it is classified into two types: 1. Internal cache:  It is a small high speed memory that contains frequently used data.  The use of cache avoids repeated reading of data, from slower main memory.  It is located with processor. 2. External cache:  It is used to supplement the internal cache.  It is used when an internal cache is not present.  It is placed between CPU and main memory. Processor Registers:  Registers are location within the micro-processor where data is stored temporarily during processing.  These internal high speed registers are used in arithmetic and logical operations for holding data operands.  Some registers are accessible by user through instructions, and others are reserved for the use of CPU to perform its activities.  The figure below gives memory preferences: -

Program execution steps: - Executing a program in c involves a series of steps. They are: -

1. Creating the program. 2. Compiling the program. 3. Linking with functions needed from c library. 4. Executing the program. The commands used for implementing these steps differ with difference in operating system.

Operating system: - it is an interface between hardware and user handles execution of user programs. It is a program that controls entire operation andinput/output operatio totally.Two popular operating systems are: UNIX (for mini computers) and MS-DOS (or) WINDOWS (for micro computers)

Basic structure of ‘c’ program:  ‘C’ program can be viewed as group of functions.  A ‘c’ program may contain one or more sections as shown in fig:  Documentation section: - it consists of comments enclosed in between /*-----------------*/. The lines beginning with /* and ending with */ are called comment lines. These are used for program enhancement and reliability. We cannot have nested comments I.e., comment line inside comment line.

 Link section: - The link section provides the instructions to the compiler to link functions from system library. Syntax: - #include By default these header files are included to c program Stdio.h  Standard input output header file. E.g.: printf(),scanf()…. Conio.h Console input output header file. E.g.: clrscr(),getch()… Stdlib.h  standard library header file. E.g.: atoi(). Math.h mathematical functions header file. E.g.: cosx(), sinx(), pow()….  Definition section: - the definition section defines all “symbolic constants”. Symbolic constants are usually written in upper case letters to distinguish them from lowercase variable names. Whenever a symbolic name is encountered the compiler substitute the value name is encountered the compiler substitute the value associated with name automatically. To change the value, we have to simply change the definition. These values remain constant throughout the program. Syntax: - #define sumbolicname value Example: - #define max 100  “#include” and “#define” are “Preprocessor compiler directives” and not statements.  Therefore, these should not end with semicolon (;).  These should not be declared in the declaration section.  Global declaration section: - The variables which are used in more than one function are called as “Global variables” and are declared at Global declaration section. It also declares user-defined functions as “Prototypes”. Main () function section: - every c program has exactly one main () function which has two parts 1) Declaration part: - it declares all variables that are used in executable part. 2) Executable part: - there is at least one statement in the executable part.  All the statements in the declaration part and the executable part end with semicolon (;0.  These two parts must be appearing between opening and closing the braces.  The program execution begins at opening brace and end at closing brace.

 Closing brace is logical end of program.  Sub program section:  It contains all user defined functions that are called in main function.  These are placed immediately after main function although they may appear in any order. » All sections, expect the main function section may be absent, when not required. » C is free from language, we can group statements together in one line as e.g.: a=b; x=y+1; x=a+x; but this is little difficult to understand. So we prefer to use one statement in single line as a=b; x=y+1; x=a+x;

Example program: -

Character set: The characters in ‘c’ are group into following categories: 1) Letters 2) Digits 3) Special characters 4) White spaces 1. Letters: - Upper Case A, B, C-------, Z. Lower case a, b, c, d, ----, z. 2. Digits: - o, 1, 2, 3, 4, ----, 9 (all decimal digits).

3. Special characters: -

, Comma

‘ Apostrophe

\

. Period

“ Quotation mark

~ Tilde

; Semi colon

! Exclamatory mark

_ Under score

: Colon

| Vertical bar

% Percent sign

? Question mark

/ Slash

& Ampersand

^

Caret

)

*

[

Left bracket

-

Right parenthesis

Back slash

Asterisk

minus sign

]

Right

Left

bracket

<

(opening angle bracket)

>

(closing angle bracket)

{

}

Right brace

#

Number sign (or) dollar

( Left

brace

parenthesis 4. White spaces: Blank spaces Horizontal tab Carriage return New line Form feed. C Tokens: - In c programming the smallest individual units are known as c tokens. C has 6 types of tokens: -

Key word:     

Every c word is either a keyword or identifier. All keywords are fixed meaning and cannot be changed. These serve as the building blocks of program statements. These keywords must be written in lower case. The list of keywords of ANSI ‘C’ are given in next page.

Auto

Double

Int

Struct

Break

Else

Long

Switch

Case

Enum

Register

Typedef

Char

Extern

Return

Union

Const

Float

Short

Unsigned

Continue

For

Signed

Void

Default

Goto

Sizeof

Volatile

Do

If

Static

While

Identifiers: - identifiers refer to names of variables, functions and arrays. Rules:     

First character must be an alphabet. Must contain only letters, digits and underscore. Only first 31 significant characters are significant. Cannot use a keyword Must not contain white space.

Constants: - constants in c refer to fixed values that do not change during the execution of program. 1) Integer constants: - an integer constant refers to a sequence of digits. There are three types of integers namely decimal integers, octal integers, hexa decimal integers. 1. Decimal integers: - it consists of set of digits 0 through 9, preceded by an optional – or + sign. e.g.: 123, -312, 0, 654321, +78. Embedded spaces, commas and non-digit characters are not permitted between digits. e.g.: 15 750; 20,000; $1000 are illegal. 2. Octal integer: - it consists of any combination of digits from the set0 through 7, with leading 0. E.g.: 037; 0435; 0; 0551 3. Real constants: - integer numbers are not sufficient to represent quantities that varies continuously. These quantities are represented by numbers containing fractional past. Such numbers are called real (or floating point) constants. Rules for constructing real constants expressed in factorial form: A real constant must have at least one digit. It must have a decimal point. It could be either positive or negative. No commas and blanks are allowed. E.g.: +325.34, 426.0, .95, +.5, -.71 It is possible to omit digits before the decimal point, or digits after decimal point. A real number may also be expressed in exponential or scientific notation. The general form is mantissa e exponent In example 215.65 can be written as 2.31565 e 2 where e 2 means multiply by 102. Mantissa is either a real number expressed in decimal notation or an integer. The letter e separating the mantissa and the exponent can be written in either lower or upper case. The exponent is an integer number with an optional + or – sign.

Since the exponent causes the decimal point. So this notation is said to represent a real number in “Floating point form”. Default sign of mantissa part is positive. The exponent has at least one digit, which must be either positive or negative. Range is -3.4 e 38 to 3.4 e 38. E.g.: +3.2 e -5, 4.1 e 8 etc., 2) Character constants: - character constants are classified into two types: I. Single character constants. II. String constants. Rules for character constants:  A character constant is a single alphabet, a single digit, or a single special symbol enclosed within single inverted and double inverted commas.  Maximum length of a character constant can be 1 character or 1 string. 1. Single character constants:  A single character constant contains single character enclosed within a pair of single quote marks.  E.g.: ‘5’, ‘x’, ‘.’, ‘ ‘.  The character constant ‘5’ is not same as number 5.  The last constant in the above examples are “white space”.  It has integer values known as ASCII values. e.g.: printf(“%d”,’a’); will print the ASCII value of ‘a’ i.e., 97; similarly, the statement printf(“%c”,97) would output a letter ‘a’.  Since each character constant represent, it is also possible to perform arithmetic operations on character constants. 2. String constants:  A string constant is a sequence of characters enclosed in double quotes.  The characters may be letters, numbers, special characters and blank spaces.  E.g.: “hello”, “1987”, “WELCOME”.

 A character constant is not equivalent to string constant since as a string constant does not have ASCII value where a character constant has.  The compiler automatically places a special character NULL (\0) at the end of string constant.  This null is called as deter miter of string. 3) Back slash character constant:  C supports same back slash character constants in output functions.  Each of these represents one character, although they consist of two characters.  These character combinations are known as “escape sequences”.

Variables:  A variable is a data name that may be used to store a data value.  An entity that may vary during the program execution is also called as “variable”.  These are the names given to memory locations.  These locations contain integer, real (or) character constants.  A particular type of variable declared can be hold only that type of value. Rules for constructions variables names:  Variable names may consist of letters, digits and underscore (_) character.  They must begin with letter. Some systems permit underscore as first character.  ANSI standard recognizes a length of 31 characters, but only first 8 characters are treated as significant by many compilers.

 Upper case and lower case letters are different i.e., total is different from total or TOTAL.  It should not be a keyword.  White spaces or commas are not allowed in between.  No special symbols other than underscore (_) are used.  Examples: invalid: - john t-raise in valid: - 123 (area) Delhi ph.-value % mark Mark Data types:  Data is represented using numbers or characters.  The difference in the type of the data can be specified by data types at declaration and execution.  C language is rich in data types.  Each data type has predetermined memory requirement and an associated range of legal values.  C supports 4 different classes of data types namely 1) Primary or fundamental or basic or built in data types. 2) User defined data types. 3) Derived data types. 1. Primary data types: - All c compilers support five fundamental data types namely integer [int]; floating point [float] and character [char] and empty [void] data types. Many of them offer extended data types such as long int, etc.,

Qualifiers:  In c we have two important qualifiers:  Sign qualifier (u)  Size qualifier (L)  E.g.: 100000U, 120000L.

Given are the data types with memory space and range: S.no

Data type

Memory space required

Range

1

Character or signed character.

1 byte

-128 to 127

2

Unsigned character

1 byte

0 to 255

3

Int or signed int

2 bytes

-32768 to 32767

4

Unsigned int

2 bytes

0 to 65535

5

Short int or signed short int

1 byte

-128 to 127

6

Unsigned short int

1 byte

0 to 255

7

Long int or signed long int

4 bytes

-231 to 231-1

8

Unsigned long int

4 bytes

0 to 262

9

Float

4 bytes

+3.4E -38 to 3.4E +38

10

Double

8 bytes

1.7E -308 to 1.7 E +308

11

Long double

10 bytes

3.4 E -4932 to 3.1 E +4932

 Integer data types: -these are whole numbers with a range of values.  If we use a 16-bit word length, the size of integer value is limited to 215 to 215-1.  A signed integer uses one bit for sign and 15 bits for magnitude of a number.  By default, this integer data types are declared as “int” (2 bytes).  Floating point types:  Floating point or real numbers stored in 32 bits, with 6 bits of “precision” (no of digits after decimal point).

 These numbers are defined in c by keyboard “float”.  When accuracy provided by float number is not sufficient, then the type “double” is used for 64 bits giving a precision of 14 digits.  These are known as double precision numbers.  To extend precision further, we use long double  By default “float” is declared.  Character type: A single character can be defined as character (char) type data. By default, “char” is declared.  Void datatype:  This data type has no value.  This is used to specify the type of function when it doesn’t return any value to calling function. 2. User defined datatype: The user data type are two types: - they are. 1) Type definition:  The user can define an identifier that represents an existing data type by a feature known as “type definition”.  The user defined data types identifier can later be used to declare variables.  General form: - Typedef type identifier:  Here “type” refers to the existing data type and “identifier” refers to new name given to data type.  E.g.: typedef int sno; typedef float salary;  Here sno symbolizes int and salary symbolizes float. These can be used to declare variables as follows: - sno c1, c2; Salary e1, e2; 2) Enumerated datatype:  This datatype can be used to declare variables that can have one of the values out of many enumeration constants.  After that we declare variables of this new type.  General form: - enum identifier {v1,v2,v3,------,vn);  E.g.: enum day {Monday,Tuesday,-----,Sunday}; Enum day weekst,weekend; Weekst=Monday; Weekend=Saturday;

3. Derived datatypes: -These are the datatypes that are derived from other data types. e.g.: arrays, pointers etc., Declaration of variables: -After designing suitable variable names, we must declare them to compiler. Declaration does two things: 1. It tells the compiler what the variable is. 2. It specifies what type of data the variable will hold. The declaration of variables must be done before used in the program. Primary type declaration:  A variable can be used to store a value of any data type that is, the name has nothing to do with its type.  The syntax for declaring a variable is as follows: Datatype v1,v2,v3,-----,vn;  Datatype can be either integer, float, char or double. Here v1,v2,v3,---vn are the name of variables.  Variables are separated by commas.  A declaration statement must end with a semicolon. Scope of variables:    

Scope of variables implies to availability within the program. Variables are of two types they are local and global. A variable declared global is accessible to all statements in program. A variable declared local is restricted to be accessed by only selected statements in the program in which it is defined.  Global variables are declared outside all functions where as local variables are declared inside a function.  These functions use storage classes to define variables about their usage they include: 1. Auto. 2. Static. 3. Extern. 4. Register.  We will have detailed look about these in functions.

Assigning values to variables:  Values can be assigned to variables by using assignment operators.  An assignment statement implies that the value of the variable on the right of equal sign is equal to the value of the quantity on the left.  Syntax: - variable name =constant:  E.g.: a=5.5;  In c multiple assignment statements in a single line is allowed. E.g.: a=4;b=3.5;  Equal sign is used as assignment statement by using multiple assignment operators that assigns R.H.S of “=” to L.H.S of “=”.  C permits initialization of more than one value in one statement by using multiple assignment operators.  E.g.: x=y=10; x=y=z=10; a=b=c=temp;  It is also possible to assign a value to the variable at the time the variable declared.  Syntax: datatype variable name=constant; e.g.: int p=a; char yes=’x’; double value=5;  There are suitable variations of type declaration instruction. » While declaring the type of variable we can also initialize it as shown below: Int i=10,j=25; Float a=1.5,b=1.99+2.4*1.44; » The order in which we define a variable is sometimes important and sometimes not. » E.g.: int i=10;j=25; is same as int j=25,i=10; However float a=1.5,b=a+3.1; is legal but float b=a+3.1,a=1.5 is not. Because we are trying to use ‘a’ before defining it. » The following statements would work: i.e., int a,b,c,d; a=b=c=d=10;

Defining symbolic constants: -

 We use same constants that appear repeatedly in no. of places in the program.  E.g.: the mathematical constant “pi” within the value 3.1412  In any case if we want to change the value of ”pi“ we have to search through the program, if any value is left, the program may produce wrong results.  To avoid this disadvantage c provides to define symbolic constants  General form: - #define symbolic name value of constant e.g.: #define pi 3.1412 #define max 100  Symbolic names are sometimes called constant identifiers.  Since symbolic names are constants (not variables). So they do not appear in declarations. Rules for defining #define statement for defining symbolic constants:  Symbolic names have the same form as variable names. (They are written in capitals to distinguish from variables, it is a convention, not rule).  No blank spaces between ‘#’(pound) sign and “define” is permitted.  # be the first character in the line.  A blank space is required between #define and symbolic name and between symbolic name and constant.  #define statements must not end with a semicolon.  After definition, this symbolic name should not be assigned any other value within the program by using an assignment statement.  E.g.: #define MAX 100 and MAX=150; is illegal in the same program.  Symbolic names are not declared for datatypes. Its data type depends on type of constant.  These can have definitions anywhere but should be defined before it is referenced in the program.  # is a “preprocessor directive of the compiler”. Invalid statements of #define:  #define x=2.5  “=” not allowed.  # define MAX  no white space between # and define.  #define V 25;  no semicolon etc., Declaring variable as constant: -

 We can declare the value of the variable to be constant throughout the program without #define with qualifier “const”. e.g.: const int classsize=40;  This value of variable cannot be modified but can be used at right side of the program. Declaring variable as volatile: - ANSI standard defines another qualifier “volatile” which could be used to tell explicitly. The compiler that the variable’s value may be changed at any time by external sources. (From outside the program) e.g. volatile int data; Remember its own program can modify the value of a variable declared as volatile as well. If we wish that value must not be modified by the program while it may be attired by some other process, then we may declare the variable as both const and volatile as: Volatile const int location=100; Reading a character:    

Reading a single character can be done by using the function getchar. Syntax: variable_name=getchar(); Variable_name is a valid c name should be declared of char datatype. E.g. char name: Name=getchar(); will assign character ‘H’ from the keyboard when control is waiting at terminal.  ‘c’ supports many functions that are working for character manipulations of single character.

 These character functions are contained in the file ctype.h and therefore the statement #include must be included in the program.

Writing a character:    

This is a function used to write characters one at a time to the terminal. Syntax: putchar(variable_name); Variable_name is a type “char” variable containing a character. This statement displays the character contained in the variable_name at the terminal.  E.g. answer=’y’ Putchar(answer); will display character ‘y’ on the screen. The statement putchar (\n); would cause the cursor to move to beginning of next line. Formatted input:  It refers to an input data that has been arranged in a particular format.  Scanf means “scan formatted”.  The general form of scanf is: Scanf(“control string”,arg1 arg2,------argn);  The control field specifies the field format in which the data to be entered.  The arg1,arg2,---argn specifies the address location in which the data to be stored.  Thye arguments in scanf are given as “&variable”.  Commas separate control string and arguments.  Control string (known as “format string”) include: 1) Field (or format) specifications, containing a conversion character (%), a data type character (or type specifier) and optional number (specifying width). 2) Blanks, tabs or new lines. Inputting integer number:  The field specification for reading an integer is “”%wd””.  Where w= integer number that specifies field width and d= datatype specifier for integers.  E.g. scanf(“%2d%5d”,&num1,&num2);

 Terminal: - 50 31426 => num1=50, num2 31426;  But the data is like this at terminal  31426 50 num1=31, num2= 426 and the value of 50 which is unread will be assigned to the first variable in next scan cell.  An input field may be skipped by specifying * in the place of field width.  E.g. scanf(“%d%*d%d”,&a,&b);  Terminal: - 123 456 789 is assigned as a=123, 456 is skipped, b=789;  %ld for long int  %hd for short int. Inputting real numbers:  Unlike integers, field width of real numbers is not specified and so reads real numbers with sample “%f” specification for both decimal and exponential notation.  E.g. scanf(“%f%f%f”,&x,&y,&z);  Terminal: - 475.89 42.21E -1 678 X=475.89; y=42.21; z= 678.0;  If number to be read is of double type “”%lf”” is used and if we want any no to be skipped use “”%*f””. Inputting character strings:  

A scanf function can input strings containing more than one character. The following are specifications for character strings: %ws or %wc.  Some versions of scanf support the following conversion specifications for strings:  % [characters]  only characters specified within the brackets are permissible in the input string. Otherwise, the string will be terminated from reading.  % [^characters]  only characters specified within the braces are not permissible, otherwise reading will be terminated.

Reading mixed data:  It is possible to use one scanf in input data line in mixed mode data.  In such cases, the input data items should match the control specifications in order and type, if not the reading will be stopped.  E.g. scanf(“%d%c%f%s”,&count,&code,&ratio,&name);

 Terminal: - 15 p 1.575 coffee  Count=15, code=p, ratio= 1.575, name=coffee.

Note: - it is legal to use a nonwhite space characters in given field specifications. However, scanf() expects the same character at terminal. E.g. scanf(“%d-%d”,&a&b); accepts input like 123-456. a=123, b=456: Formatted input:  it refers to output data that has been arranged in a particular format to be printed.  Printf means print formatted.  The general statement of printf is printf(“control string”,arg1,arg2,----,argn);  Control strings consists of three types of items. 1. Characters that will be printed on screen as they appear in double quotes other than type specifiers and some special characters. 2. Format specifications (or type specifiers) that define output format for displaying each item. 3. Escape sequence characters such as \n, \t, \b.  The control string specifies how many arguments follow and what their types are.  The arguments arg1,arg2,-----argn are the variables whose  The arguments values are printed according to specifications of control stringf.  The arguments should match in number, order, type with format specifications.  A simple format specification has the following form %w.p type specifier  Where w is an integernumber that specifies total no of columns and p is integer number specifies no. of. Digits right of decimal point. Both w and p are optional.

 Printf never gives newline automatically. \n introduced in central string will give new line. Output of integer numbers:  The format specification for printing an integer number is %wd. Where w specifies width for output.  The number is written right justified in given field width. Leading blanks will appear as necessary.  E.g. The minus (-) and zero (0) are known as “flags”. Long integers  ld ; short integers  hd; Output of real numbers: General format specification is

%w.pf

Where ‘w’  no of positions to display the value. ‘p’  no of digits to be displayed after point (precision). The default precision is 6 decimal places. Printing a single character: General format is %wc The character will be displayed right justified, and if we place ‘-‘ before w then the character is left justified. The default value for w is 1 Printing of strings: The format is same of real number it is of the form %wps. Where w  field width, p  only first ‘p’ characters are displayed. The display is right justified. Mixed data output: -

It is permitted to mix data types in one printf statement. E.g. printf(“%d%f%s%c”,a,b,c,d); We can use ‘\t’ and ‘\n’ for enhancing readability in the place of control string. E.g. printf(“a=%d\tb=%d”,a,b); Mathematical function: All the mathematical functions are included in header file. In order to use any mathematical, function in our program. E.g. sin(x) radians.

sinh(x)

Cos(x)

cosh(x)

Tan(x)

tanh(x).

in the above functions x must be given in

Note: - conversion of degree into radians => sin ((x*22)/(7*180))  Ceil(x): - In ceil(x): ‘x’ is rounded up to nearest integral (above the integer). E.g. ceil (3.4)  4; ceil (0.4)  1.  Floor(x): - in floor(x); ‘x’ is rounded down to the nearest integer. E.g. floor(3.4)  3.  Exponential of x  (exp(x)) => e2.  Absolute of ‘x’  (fabs(x)) => fabs(-4)=4. F(x): this is similar to modular division => fmod(x,y);  Log(x): this gives the neutral logarithm of x. (x>0) Log10(x)  logarithm to base 10.  Pow(x,y) => xy.  Sqrt(x) => √x. Note: - in all the above functions the x & y values must be declared in double.

Operators: - An operator is a symbol that tells the computer to perform mathematical or logical manipulation.  Operators are used in programs to manipulate data and variables.  They usually form into mathematical or logical expressions.

C supports 8 kinds of operators: 1) Arithmetic operators. 2) Relational operators. 3) Logical operators. 4) Assignment operators. 5) Increment and decrement operators. 6) Conditional operators. 7) Bitwise operators. 8) Special operators. 1) Arithmetic operators: The basic operators are: -

 Integer division truncates any fractional part.  Modular division operation produces the remainder of integer division.  Examples of arithmetic operators are: a+b; a-b; a*b; a/b; a%b; -a*b etc…  Here ‘a’ and ‘b’ are operands.  Modulo division (%) operator cannot be used on floating point data.  ‘c’ does not have operator for exponentiation. Integer Arithmetic:  The expression is called as an “integer expression”, and the operation is called “integer arithmetic”.  If ‘a’ and ‘b’ are integers, for a=14; b=4; a-b=10; a+b=18; a*b=56; a/b=3 (decimal part truncated) : a%b=2 (remainder of division).  During integer division, if both the operands are of same sign, is result is truncated towards zero.

 If one of them is negative, the direction of truncation is implementation dependent i.e., 6/7=0, -6/-7=0. But -6/7 may be 0 or -1  Modulo division, the sign of result is always the sign of first operand. i.e., -14/3=-2; -14%-3=-2; 14/-3=2; -1/2=-1; 1/-2=1; -1/-2=-1; ½=1. Real arithmetic: - an arithmetic operation involving real operand is called “real arithmetic”.

The operator % cannot be used with real operands. Mixed-mode arithmetic: -when one of the operands is real and other is integer. The expression is called mixed-mode arithmetic expression. If either operand is of real type, then only real operation is performed and the result is always a real numbers. Thus 15/10.0=1.5 whereas 15/10=1.

2) Real operators:  We often compare two quantities and depending on their relation, take certain decisions.  The comparisons can be done with the help of “relational operators”.  An expression containing a relational operator is termed as a “relational expression”.  The value oif expression is either ‘one’ or ‘zero’.  If one  specified relational is true; if zero  relation is false.

Relational expression contains only one operator and takes the form:

Ae-1

relational operator

ae-2

3) Logical operators:  In addition to relational operators, ‘c’ has the following three logical operators:  &&  logical AND. ||  logical OR !  logical NOT. e.g. the logical operators && and || ,are used when we want to test more than one condition and make decisions. E.g. a>b&&x==10.  An expression of this kind, which combines two or more relational expressions, is termed as a logical expression or a “compound relational expressions”.  Like a simple relation, it also yields a value of one or zero.

 Relative precedence of relational and logical operators:  Highest ! it is important to remember this when >>=<<= we use these operators in == != compound expressions. && Lowest ||

4) Assignment operators:  The assignment operator “=”is used to assign the result of an expression to a variable.

 In addition, ‘c’ has set of “short hand” assignment operators of the form v op=exp;  Where ‘v’ is a variable, exp is an expression, op is any binary arithmetic operator.  The operator op= is known as short hand assignment operator  The statement v op=exp; is equivalent to v=v op (exp); with ‘v’ evaluated only once.  E.g. x=x+(y+1)  x+=y+1;

5) Increment and decrement operators: - (unary operators)  “++” is used for incrementing value by 1 and “—“ is used for decrementing value by 1  ++a => pre increment A++ => post increment. e.g. if a=3 then y=a++; gives y=3 , a=4; y=++a, gives y=4, a=4;  M++ or ++m are having the same meaning for m=m+1.  A prefix operator first adds 1 to the operand and then the result is assigned to the variable on left.  On the other hand, a postfix operator first assigns the value to the variable on left and then increments the operand. 6) Conditional operators:  This is a ternary operator, which has three operands.  This takes the form exp1?exp2:exp3 where exp1,exp2,exp3 are expressions.  Operation: » 1st exp1 is evaluated, if it is a nonzero . then the expression exp2 is evaluated and becomes the value of the expression. » But, only one of the expressions ( either exp2 or exp3) is evaluated.

» For e.g. a=10; b=15; x=(a>b)?a:b; If (a>b) x=a; Else x=b; 7) Bitwise operators: -this concept is discussed in the next chapter. 8) Special operators: - special characters such as comma operator, sizeof operator, pointer operators (& and*) and member selection operators ( . and  ). i. Comma operator:  The comma operator can be used to link related expressions together.  Comma-linked list of expressions are evaluated left to right and the value of right most expression is value of combined expression. e.g. value=(x=10, y=5, x+y);. ii. Sizeof operator:  It is a compile time operator and when used with an operand, it returns the no of bytes the operand occupies.  The operand may be a variable, a constant or a datatype qualifier.  E.g. m=sizeof(sum); n=sizeof(long int); k=sizeof(235l); iii. Pointer operators (& and *) and member selection operators(. And ) are discussed in the later chapters. Arithmetic expressions: - an arithmetic expressions is a combination of variables, constants and operators arranged as per syntax of language. E.g. a*b-c. Evaluation of expressions:    

Expressions are evaluated using an assignment statement. Variable=expression; Variable is any valid c variable name. When the statement is encountered, expression is evaluated first and then the result replaces the previous value of the variable on the left-hand side.

Precedence of arithmetic operators: -

 An arithmetic expression without parenthesis will be evaluated from left to right.  Using rules of precedence of operators as: high priority * / % Low priority + Evaluation procedure:  It includes “two” left-to-right passes through expression.  During the first pass, the high priority operators are evaluated (if any).  During the second pass, the low priority operators are evaluated (if any).

 If parenthesis are included in the expression then it is given the highest priority. c=(a-b)*(d-c) P1 p2 st  1 p1 and p2 are evaluated then p1*p2 are evaluated. Associativity rule:  If an expression contains two or more operators of equal priority, then we evaluate the expression depending upon the associative rule.

Rules of precedence of operators in expressions: 1. First, parenthesized sub-expression from right to left are evaluated. 2. If parenthesis are nested, evaluation begins with inner most subexpression. 3. When parenthesis are used, expressions with parenthesis assume highest priority. Type conversions: - conversion of one datatype to another data type is known as “type conversion”. 1. Implicit type conversions:  c automatically converts any intermediate values to proper type. This automatic conversion is known as “implicit type conversion”.  During evaluation, ‘c’ follows strict rules for type conversion is “ if the operands are of different types, the lower data type is automatically converted to higher data type.  A typical type conversion process is given below: - all the short and char are automatically converted to int, then 1.

2. If one of the operand is long double, the other will be converted into long double and the result will be long double. 3. Else, if one of the operands is double, the other will be converted into double and result is double. 4. Else if one of the operand is float, the other will be converted to float and result will be float. 5. Else, if one of the operand is unsigned long int, other will be converted to unsigned long int and the result is unsigned long int. 6. Else if one of operands is long int, other is unsigned int, then  If unsigned int can be converted to long int then it is converted and result is long int.  Else both operands are converted to unsigned long int and result will be unsigned long int.  Else if one of the operand is long int, the other will be converted to long int and result will be long int.  Else if one of the operands is unsigned int, the other will be converted to unsigned int and result will be unsigned int.

Explicit type conversions:  The process of forcibly converting one datatype to another datatype by the user is called “explicit conversion (or) type casting”.  The general format is (typename)expression;  Where typename  one of c standard datatypes. Expression may be constant or variable or expression.  E.g. x=(int)7.5 => x=7; a=(int)21.3/(int)4.5 => a=5 etc., Coercion: - the implicit conversion is known as coercion. e.g. int a=3;

float b; b=a;

Programs: 1. sample program: -

3.

#include

#include

Void main()

#include

{

void main() Printf(“welcome”);

{

}

printf(“enter two values”);

Output: - welcome

scanf(“%d%d”,&a,&b);

2. sample program: no=%f”,b,a); #include Void main()

printf(“integer=%d,real } output: - enter two values

{

7.2 Printf(“name\nrollno\n”);

5

integer=5,realnumber=7.2

} Output: - name Rollno 4. Write a program to accept length and width of a rectangle. Compute area and perimeter, and print length, breadth, area and perimeter of rectangle. #include #include void main() { float length, breadth,area,perimeter;

printf(“enter length and breadth of rectangle”\n\t); scanf(“%f%f”,&length,&breadth); area=length*breadth; perimeter=2*(length+breadth); printf(“\n\tlength=%f\n\twidth=%f\n\tarea=%f\n\tperimeter=%f\n\t”,length, breadth,area,perimeter); 5. Write a program to accept radius of a circle, compute its area and print it. (using symbolic constant). #include #include #define PI 3.1415 void main() { float r,a; printf(“enter radius of circle:”); scanf(“%f”,&r); a=PI*r*r; printf(“radius=%f, area=%f”,r,a); } 6. Write a program to accept principal amount, rate and no. of. years and compute interest. #include #include void main() { float p,r,I; int n; printf(“enter principle, rate of interest and no of years:”); scanf(“%f%f%d”,&p,&r,&n); i=(p*n*r)/100; printf(“Theprinciple=%f,rateofinterest=%f,noofyears=%d,simpleinterest=%f:, p,r,n,i); }

7. Write a program to compute xn value #include #include #include void main() { int n; double x,r; printf(“enter value of x and n :”); scanf(“%lf%d”,&x,&n); r=pow(x,n); printf(“computed value =%lf”,r); } 8. Write a program to compute (ax+b)/(ax-b) #include #include #include void main() { float a,b,x; double r; printf(“enter 3 numbers”); scanf(“%f%f%f”,&a,&b,&x); r=(a*x+b)/(a*x-b); printf(“%lf”,r); } 9. Write a c program to compute 2.5logx+cos 320+|x2-y2|+√(2xy). #include #include #include void main() { double x,y,r; scanf(“%lf%lf”,&x,&y); r=2.5*log(x)+cos((32*22)/(7*180))+fabs(x*x-y*y)+sqrt(2*x*y); printf(“%lf is the value computed”,r); }

UNIT – 2 Bitwise operators:  The c language is well suited to system programming because it contains operators that contains operators that can manipulate at bit level.  c has two categories of bitwise operators that operate data on bit level. 1. logical bitwise operators: - these operators look at data as individual bits to be manipulated. there are four logical bitwise operators: 1) Bitwise AND(&) operator: » it is a binary operator that requires two operands (character (or) integer). » it does bit by bit comparison between two operands. » if the result of the comparison is 1 when we both the operands are 1, otherwise it is 0. Note: - uint is a data type that specifies the corresponding data variables as “unsigned int” with memory allocation of 8 bits. this datatype is included in header file. e.g. #include stdio.h> main() { uint c,a,b; clrscr(); printf(“enter two operand :”); scanf(“%d%d”,&a,&b); c=a&b; printf(“the result of %d and %d is %d”,a,b,c); getch();

} 2) Bitwise or(|) (or) Bitwise inclusive or: » This operator requires two integral operands. it does bit by bit comparison between the two operands. » The result of comparison is 0(zero) if both the operans are zero otherwise 1. #include main() { clrscr(); printf(“enter two operands:’); scanf(“%d%d”,&a,&b); c=a|b; printf(“the result of %d or %d is %d”,a,b,c); getch(); } 3) Bitwise exclusive or (^) operator: » It is also a binary operator that requires two integral operands. » It does bit byb bit comparisions between two operands. » The result of comparision is 1 only if both operands are different and ‘0’, if both operands are same. » #include #include void main() { int a,b,c,d; printf(“enter two operans :”); scanf(“%d%d”,&a,&b); c=a^b; d=~c; printf(“the result is %s,%d”,c,d);

getch(); } 4) One’s complement operator(~): » it is an unary operator applied to an integral value (character (or) integer) » if results in the complement of given bit i.e., reverses the bit value.

2. Shift operator: » the shift operators move bits to right or left when applied to unsigned numbers. » these operators are implementation independent . » when used with signred numbers however, the implementation is left to the direction of the software engineer who designs the system. » there are three types of shift operators:

i.

Bitwise shift right operators(>>):  The bitwise shift right is a binary operator that requires two integral operands.  The first value of theoperand is to be shifted.  The second operator specifies the no of digits to be shifted.  When the bits are shifted right, the bits at the right most end are deleted and the zero bits are added at left most end.

ii.

Bitwise shift left operator: (<<):  The bitwise shift left (<<) is a binary operator that requires two integral operands (character/integer).  The first operand is the value to be shifted and the second operand specifies no of bits to be shifted.  In this left shift, the digits in the left most places are discarded and the no of bits on the right most place are inserted with zeros.

iii.

Rotation:  It requires that bits from one end of a value and moved to other end.  When we rotates bits left, we shift them off the right end of the value and insert them on the left  When we rotates bits right, we shift them off the left end of the value and insert them on the right.

iv.

Masking:  The mask operation is also called as “selective clear” operation.

 In this operation we have two operands a and b. where ‘a’ data is to be modified with reference to data of b.  Operation: - The bit of a are cleared to zero for the output at those corresponding bit positions of b having zeros and remaining bits will remain same as a for output for the bit positions of non-zero.

Control statements The execution of program in c will be in sequential manner. if we introduce control statements, then the control flows depending upon the condition given. Compound statement: the set of statements placed between curly braces are known as compound statement (or) a black in ‘c’. Syntax: - { ---------------------} every statement in the compound statement ends with semicolon. Control structures: -

Branching statements:  These type of control statements are also known as decision making statements.  These statements contain a condition, depending upon the condition, the control will branch from one place to another place.  In practice, we have no of situations where we may have to change order of execution of statements, based on certain conditions, or repeat a group of statements until certain specified conditions are met.  This involves “selection” which allows us to choose between two or more alternatives and make decisions.  Selection is of two types: 1. Two-way selection:  The basic decision statement in computer is the two way selection.  Depending upon the answer of condition, decision is to be taken.  If condition is true, one or more set of statements are executed.  If condition is false, different set of statements are executed.  Regardless of the set of statements under condition the program continues with next statement after selection.  C supports the following decision making statements for two way selection: 1) If – else statement: 2) Simple if or null else statement 3) Nested if 4) Conditional operator. 1) If – else statement: - an if else statement is a composite statement used to make decision from to alternatives.

Syntax:  If the test expression is true, the true block statements are executed, otherwise, if expression is false, the false block statements are executed.  In any case, only one set of statements can be executed but not both.  In both the cases, the control is tgransferred automatically to statement – x. Write a program to chech whether given number is even or odd. #include #include Void main() { Int a; Clrscr(); Printf(“enter number”); Scanf(“%d”,&a); If(a%2==0) Printf(“the number is even :%d”,a); Else Printf(“the number ids odd :%d”,a); Getch(); }

2) Null else (simple if):  Although there are always two possible actions after a decision, we may always not case about else condition i.e., it can be omitted.  This omission can be shown as “null else” statement (a null statement consists of only a semicolon).  Syntax: If(expression) { Statement block; } Statement – x;  Write a program to find whether the given number is positive. #include #include Void main() { Int a; Clrscr(); Scanf(“%d”,&a); If(a>0) Printf(“the number is positive”); Getch(); }  Write a c program to find whether given number is divisible by 5. #include #include Void main() { Int n; Clrscr(); Printf(“enter a number”); Scanf(“%d”,&n); If(n%5==0) Printf(“5 is divisible by 5”); Getch();

} 3) Nested-if:  An if else statement, may include another if else statement when an if else is included into another if else, it is known as nested if statement.  Syntax: If(exp1) { If(exp2) { Statement1; } Else { Statement 2; } } Else Statement3; #include #include Void main() { Int a,b; Clrscr(); Printf(“enter two integers”); Scanf(“%d%d”,&a,&b); If(a<=b) { If(a
Dangling else problem:  Once we start nesting if else statements, we can encounter a classic problem known as “dangling else”.  This problem is created when there is no matching else for every if.  C’s solution for this problem is a simple rule “always pair an else to the most recent unpaired if in the current block”.  This rule may result in some if statements being left unpaired.  A solution to the dangling else problem is to enclose the true actions in braces to make the second if a compound statement.

Conditional operator:  C provides a convenient alternative to the traditional if else two way selection which contains three operands. So, it is called Ternary operands.  Syntax:- exp of condition?exp1:exp2  The conditional expression is evaluated first, if the expression result is true “exp1” is evaluated, if the result is false “exp2” is evaluated.  e.g. a==b?c++:d++; here if a equal to b then c is incremented, if a not equals to b then d is incremented. #include #include Void main() { Int a,b,c=0,d=1; Clrscr();

Printf(“enter two values :”); Scanf(“%d%d”,&a,&b); A==b?c++:d++; Printf(“the result of condition is %d and %d”,c,d); Getch(); } Multiway selection: 

In addition to two way selection, most programming languages provide another selection concept known as “Multiway selection”. It chooses among several alternatives.  C has two different ways to implement multiway selection: 1. Switch 2. Else – if [ladder] 1) Switch statement: -switch is a composite statement used to make a decision between many alternatives.

Syntax: Switch(exp) { Case value 1: block of statements1; Break; Case value2: block of statements2; Break; ---------------------------------------------------------------------------------------------

Default: default-block of statements; Break; } Statement-x;  The expression is an integer expression (or) characters. Value1, value2, value3, ---------, valuen are constants or constants expressions and are known as case labels. The case labels end with a colon(:).  When the switch is executed, the value of the expression is compared against the values value1, value2, value3,-------------valuen.  If a case is found whose values matches with value of expression then the corresponding block of statements of the case are executed.  The “break” statement at the end of each block causes an exit from the “switch” statement, transforming the control to statement-x following the switch.  The “default” is an optional case if this case present, then these block of statements will be executed if the value of the expression does not match with any of case values.  If default case is not present, no action takes place, if all matches fail, control goes to statement-x.  Two are more case labels can be associated with same set of actions.

Main() { Int index,score; Char grade; Clrscr(); Printf(“enter score”); Scanf(“%d”,&score); Index=score/10; Switch(index)

{ Case 10: grade=’a’; Break; Case 9: grade=’a’; Break; Case 8: grade=’b’; Break; Case 7: grade=’c’; Break; Case 6: grade=’d’; Break; Default: grade=’f’; } Printf(“grade is %c”,grade); Getch(); }

Main() { Int index,score; Char grade; Clrscr(); Printf(“enter score”); Scanf(“%d”,&score); Index=score/10; Switch(index)

{ Case 10: Case 9: grade=’a’; Break; Case 8: grade=’b’; Break; Case 7: grade=’c’; Break; Case 6: grade=’d’; Break; Default: grade=’f’; } Printf(“grade is %c”,grade); Getch(); }

2) Else-if:  The switch statements works when the expressions in the case label are integral i.e., not range of values.  If we made to make a decision on the basis of a value that is not integral i.e., range of values then else if ladder is uses.

 A multipath decision is a chain of its in which statement associated with each else is an if.  The conditions are evaluated from top to bottom of the ladder downwards.  As soon as a true condition is found, the statement associated is found, the statement associated with it is executed and the control is transferred to statement-x.  When all the n-conditions become false, then final else containing default statement will be executed. Main() { Int score; Char grade; Clrscr(); Printf(“enter score”); Scanf(“%d”,&score); If(score>=90) Grade=’a’; Else if(score>=80) Grade=’b’; Else if(score>=70) Grade=’c’; Else if(score>=60) Grade=’d’; Else Grade=’f’; Printf(“grade is %c”,grade); Getch();

} Goto statements:  It is an unconditional branch statement that can change from one place to other.  The goto requires a “label” in order to identify the place where the branch is to be made.  A label is any valid variable name and must be followed by a colon.  The label is placed immediately before the statements where control is transferred.  The goto breaks the normal sequential execution of the program.  If the label: is before the statement goto label; a loop will be formed and such statements will be executed repeatedly. Such a jump is called “backward jump”.  If the label: is placed after goto label; some statements will be skipped. Such a jump is called “forward jump”. Goto label; label: ------------statement; -----------------------------------------------------Label: --------------Statement; goto label; Forward jump

back ward jump

 Another use of the goto statements is to transfer the control out of the loop (nested loops) when peculiar conditions are encountered.  E.g. ---------------While(------) { For(------) { -----------

If(-----)goto end_of_program; -----} -----} end_of_program: Disadvantages:  Due to the unconditional goto statement at end, control always transferred back to input statements. In fact, the program puts system in permanent loop known as “infinite loop”. Such infinite loops should be avoided.  Main() { Printf(“welcome to c\n”); Goto new; Printf(“skipped statement”); New; Printf(“example of goto”); Getch(); } Programs: 1) Write program to accept two numbers and find out the biggest number and print the number. #include #include Void main() { Int a,b; Clrscr(); Printf(“enter two numbers\n”); Scanf(“%d%d”,&a,&b); If(a>b) Printf(“%d is the largest”,a);

Else Printf(“%d is thye largest”,b); Getch(); } 2) Write a program to write the word equivalent for the digit given(single digit). Main() { Int n; Printf(“enter any number between 0-9\n”); Scanf(“%d”,&n); Switch(n) { Case 0: printf(“zero”); break; Case 1: printf(“one”); break; Case 2: printf(“two”); break; Case 3: printf(“three”); break; Case 4: printf(“four”); break; Case 5: printf(“five”); break; Case 6: printf(“six”); break; Case 7: printf(“seven”); break; Case 8: printf(“eight”); break; Case 9: printf(“nine”); break; Default: printf(“invalid input”); } Getch(); } 3) Write a program to accept two numbers and one arithmetic operator from user, performs the operation and then print the result. #include #include Void main() { Float a,b,c; Char ch; Clrscr(); Printf(“enter two numbers :”);

Scanf(“%f%f”,&a,&b); Printf(“enter any arithmetic operator :”); Scanf(“%c”,&ch); Switch(ch) { Case ‘+’: c=a+b; Printf(“the value of c is %f”,c); Break; Case ‘-‘: c=a-b; Printf(“the value of c is %f”,c); Break; Case ‘*‘: c=a*b; Printf(“the value of c is %f”,c); Break; Case ‘/‘: c=a/b; Printf(“the value of c is %f”,c); Break; Case ‘%‘: c=a%b; Printf(“the value of c is %f”,c); Break; Default: printf(“invalid arithmetic operator”); } Getch(); } 4) Write a program for swapping of two numbers using a temporary variable.[swapping two values interchanging two values] #include #include Void main() { Int a,b,t; Clrscr(); Printf(“enter two values of integers :”); Scanf(“%d%d”,&a,&b); Printf(“the values before swapping are : %d%d”,a,b); t=a; a=b;

b=t; printf(“the values after swapping are %d%d”,a,b); getch(); } 5) Write a program for swapping of two numbers without using temporary variable. #include #include Void main() { Int a,b; Printf(“enter two integer numbers :”); Scanf(“%d%d”,&a,&b); Printf(“the values before swapping are %d%d”,a,b); a=a+b; b=a-b; a=a-b; printf(“the values after swapping are %d%d”,a,b); getch(); }

C programming notes of 3 units.pdf

Definition: A computer is an electronic. device that takes data and instructions as. “Input” from the user, “Processes” the data. and provides useful information ...

3MB Sizes 6 Downloads 140 Views

Recommend Documents

Fundamentals of C Programming
A programming language provides a set of rules to develop a program. A person who .... Windows and Apple Mac. ..... the application as well as the machine.

The C programming Language
developed, since both the system and most of the programs that run on it are written in C. The language, however, is not tied .... Most can be written in C, and except for the operating system details they conceal, are ... Chapter 7 describes the sta

The C programming Language
A preprocessing step performs macro substitution on program text, inclusion of other .... Chapter 1 is a tutorial on the central part of C. The purpose is to get the ...... As an illustration of some of the bit operators, consider the function getbit

The C programming Language
3. The for statement. 4. Symbolic Constants. 5. Character Input and Output. 1. .... assignment or a function call, can be a statement. Pointers provide for .... The only way to learn a new programming language is by writing programs in it. The first 

C Programming Basics.pdf
the curly braces {} define the beginning and end of a program block ..... and Mathews Leon (2001), Introduction to Information Technology, Tata McGraw-Hill.

Expert C Programming
Aug 24, 1992 - code fragments, not in any real program, of course): ..... complicated semantics (e.g., generics or tasking in Ada; string handling in PL/I; ...

Expert C Programming
Aug 24, 1992 - Accordingly, he set up many preprocessor definitions: ...... This is a replica of the code that caused a major disruption of AT&T phone service.

C Programming 2016 Accounts
Misunderstanding the development environment and how it's set up. .... Msys2 is an application that emulates the Linux environment, which allows us to run and ...

Web Quest 3 Branches of Government notes page.pdf
http://www.socialstudieshelp.com/lesson_13_notes.htm (scroll down). After reading the information from the links, explain Checks and Balances in your. own words. Be sure to use complete sentences. Page 3 of 4. Web Quest 3 Branches of Government notes

HG Notes - Feb 3.pdf
... was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. HG Notes - Feb 3.pdf.

The Big 3 Notes Blank.pdf
Sign in. Page. 1. /. 2. Loading… Page 1 of 2. Physics 11 Name: The Big 3 Kinematics Equations. If an object is accelerating then the formula: Gives us only the ______ ______. We can also find average velocity using: 1). Ex: A squad car traveling at

Meeting Notes 3-18-2008
Mar 18, 2008 - Cead Mile Failte. Irish saying which means 100,000 welcomes! ... scription of the experiences of having his first child. SPEAKER 2: Larry. Sage.

NOTES-Hebrews Pt 3 - New Hope Church
“Lay Me Down” words and music by Chris Tomlin, Matt Redman,. Jonas Myrin, and Jason Ingram. © 2012 A Thousand Generations Publishing | Said And Done ...

UNIT –3 PARALLEL PROGRAMMING
Page 24. Parallel Algorithms &. Parallel Programming. Check Your Progress 3. 1) (a) syntax for parallel directive : #pragma omp parallel [set of clauses].