×
Nothing in the world is more common than unsuccessful people with talent.
--Your friends at LectureNotes
Close

Note for Programming in C - C By Narasimharao Mondreti

  • Programming in C - C
  • Note
  • 7 Topics
  • 20 Views
  • Uploaded 3 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

COMPUTER PROGRAMMING UNIT-I: History and Hardware - Computer Hardware, Bits and Bytes, Components, Programming Languages - Machine Language, Assembly Language, Low- and High-Level Languages, Procedural and Object-Oriented Languages, Application and System Software, The Development of C Algorithms The Software Development Process. What is a computer? Explain about functionalities of computer? A computer is an electronic device that manipulates information, or data. It has the ability to store, retrieve, and process data. A computer can be used to type documents, send email, play games, and browse the Web. We can also use it to edit or create spreadsheets, presentations, and even videos. Computer is an electronic device that is designed to work with Information. The term computer is derived from the Latin term ‘computare’, this means to calculate or programmable machine. Computer can not do anything without a Program. Functionalities of a computer / Characteristics / advantages of a computer: Any digital computer carries out five functions :  Takes data as input.  Stores the data/instructions in its memory and use them when required.  Processes the data and converts it into useful information.  Generates the output  Controls all the above four steps. Advantages or Characteristics of computer: High Speed : A Computer is a very fast device. It is capable of performing calculation of very large amount of data. The computer has units of speed in microsecond, nanosecond, and even the picosecond. It can perform millions of calculations in a few seconds as compared to man who will spend many months for doing the same task. Accuracy In addition to being very fast, computers are very accurate. The calculations are 100% error free. Computers perform all jobs with 100% accuracy provided that correct input has been given. Storage Capability M.V.R NARASIMHARAO, DEPT OF CSE Page 1

Text from page-2

COMPUTER PROGRAMMING Memory is a very important characteristic of computers. A computer has much more storage capacity than human beings. It can store large amount of data. It can store any type of data such as images, videos, text, audio and many others. Diligence Unlike human beings, a computer is free from monotony, tiredness and lack of concentration. It can work continuously without any error and boredom. It can do repeated work with same speed and accuracy. Versatility: A computer is a very versatile machine. A computer is very flexible in performing the jobs to be done. This machine can be used to solve the problems related to various fields. At one instance, it may be solving a complex scientific problem and the very next moment it may be playing a card game. Reliability: A computer is a reliable machine. Modern electronic components have long lives. Computers are designed to make maintenance easy. Automation : fComputer is an automatic machine. Automation means ability to perform the given task automatically. Once a program is given to computer i.e. stored in computer memory, the program and instruction can control the program execution without human interaction. Reduction in Paper Work: The use of computers for data processing in an organization leads to reduction in paper work and results in speeding up a process. As data in electronic files can be retrieved as and when required, the problem of maintenance of large number of paper files gets reduced. Reduction in Cost: Though the initial investment for installing a computer is high but it substantially reduces the cost of each of its transaction. What are the Disadvantages of computer? No I.Q : A computer is a machine that has no intelligence to perform any task. Each instruction has to be given to computer. A computer cannot take any decision on its own. Dependency : It functions as per a user’s instruction, so it is fully dependent on human being. Environment: The operating environment of computer should be dust free and suitable. No Feeling : Computers have no feelings or emotions. It cannot make judgment based on feeling, taste, experience, and knowledge unlike a human being. M.V.R NARASIMHARAO, DEPT OF CSE Page 2

Text from page-3

COMPUTER PROGRAMMING What are the Applications of a computer? A computer can be used in wide variety of areas. Business: A computer has high speed of calculation, diligence, accuracy, reliability, or versatility which made it an integrated part in all business organisations. Computer is used in business organisations for Payroll calculations, Budgeting, Sales analysis, Financial forecasting, Managing employees database , Maintenance of stocks etc. Banking: Today banking is almost totally dependent on computer. Banks provide following facilities: Banks provide online accounting facility, which includes current balances, deposits, overdrafts, interest charges, shares, and trustee records. ATM machines are making it even easier for customers to deal with banks. Insurance : Insurance companies are keeping all records up-to-date with the help of computers. The insurance companies, finance houses and stock broking firms are widely using computers for their concerns. Insurance companies are maintaining a database of all clients with information showing procedure to continue with policies, starting date of the policies, next due instalment of a policy, maturity date, interests due, survival benefits, bonus. Education: The computer has provided a lot of facilities in the education system. The computer provides a tool in the education system known as CBE (Computer Based Education). It involves control, delivery, and evaluation of learning. The computer education is rapidly increasing the graph of number of computer students. There are number of methods in which educational institutions can use computer to educate the students. It is used to prepare a database about performance of a student and analysis is carried out on this basis. Marketing: In marketing, uses of computer are following: Advertising - With computers, advertising professionals create art and graphics, write and revise copy, and print and disseminate ads with the goal of selling more products. At Home Shopping - Home shopping has been made possible through use of computerised catalogues that provide access to product information and permit direct entry of orders to be filled by the customers. Health Care: Computers have become important part in hospitals, labs, and dispensaries. The computers are being used in hospitals to keep the record of patients and medicines. It is also used in scanning and diagnosing different diseases. ECG, EEG, Ultrasounds and CT Scans etc. are also done by computerised machines. Some major fields of health care in which computers are used are: Diagnostic System - Computers are used to collect data and identify cause of illness. Lab-diagnostic System - All tests can be done and reports are prepared by computer. Patient Monitoring System - These are used to check patient's signs for abnormality such as in Cardiac Arrest, ECG etc. Pharma Information System - Computer checks Drug-Labels, Expiry dates, harmful drug’s side effects etc. Surgery: Nowadays, computers are also used in performing surgery. M.V.R NARASIMHARAO, DEPT OF CSE Page 3

Text from page-4

COMPUTER PROGRAMMING Engineering Design: Computers are widely used in engineering purpose. One of major areas is CAD (Computer aided design).that provides creation and modification of images. Some fields are: Structural Engineering - Requires stress and strain analysis for design of Ships, Buildings, Budgets, and Airplanes etc. Industrial Engineering - Computers deal with design, implementation and improvement of integrated systems of people, materials and equipment. Architectural Engineering - Computers help in planning towns, designing buildings, determining a range of buildings on a site using both 2D and 3D drawings. Military: Computers are largely used in defence. Modern tanks, missiles, weapons etc. Military also employs computerised control systems. Some military areas where a computer has been used are: Missile Control, Military Communication, Military Operation and Planning, Smart Weapons. Communication: Communication means to convey a message, an idea, a picture or speech that is received and understood clearly and correctly by the person for whom it is meant for. Some main areas in this category are: E-mail, Chatting, Usenet, FTP, Telnet, and Videoconferencing. Government: Computers play an important role in government. Some major fields in this category are: Budgets, Sales tax department, Income tax department, Male/Female ratio, Computerization of voters lists, Computerization of driving licensing system, Computerization of PAN card, Weather forecasting. What are the Generations or History of computers? Generation in computer terminology is a change in technology a computer is/was being used. Initially, the generation term was used to distinguish between varying hardware technologies. But nowadays, generation includes both hardware and software, which together make up an entire computer system. There are totally five computer generations known till date. Each generation has been listed in detail along with their time period and characteristics. Here approximate dates against each generations have been mentioned which are normally accepted. Following are the main five generations of computers 1 First Generation 1946-1959. Vacuum tube based. 2 Second Generation 1959-1965. Transistor based. 3 Third Generation 1965-1971. Integrated Circuit based. 4 Fourth Generation 1971-1980. VLSI microprocessor based. 5 Fifth Generation 1980-onwards. ULSI microprocessor based First Generation: The period of first generation was 1946-1959. The computers of first generation used vacuum tubes as the basic components for memory and circuitry for CPU (Central Processing Unit). These tubes, like electric bulbs, produced a lot of heat and were prone to frequent fusing of the installations, therefore, were very expensive and could be afforded only by very large organisations. In this generation mainly batch processing operating system were used. Punched cards, paper tape, and magnetic tape were used as input and output devices. The computers in this generation used machine code as programming language. M.V.R NARASIMHARAO, DEPT OF CSE Page 4

Lecture Notes