Preview

Programming

Good Essays
Open Document
Open Document
2845 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Programming
1

C PROGRAMMING NOTE
Based on the syllabus of Final B.Sc. Mathematics (Calicut University)
By

T K Rajan Selection Grade Lecturer in Mathematics Govt. Victoria College, Palakkad Phone: 9446537545

2

Contents
1 2 3 4 5 6 7 8 9 10 11 Introduction C Fundamentals Operators and Expressions Data Input Output Control Statements Functions Arrays Program structure Pointers Structures and Unions Datafiles 3 11 17 21 25 32 35 42 44 47 53

3

INTRODUCTION
Computer Basically it is a fast calculating machine which is now a days used for variety of uses ranging from house hold works to space technology. The credit of invention of this machine goes to the English Mathematician Charles Babbage. Types of Computers: Based on nature, computers are classified into Analog computers and Digital computers. The former one deals with measuring physical quantities ( concerned with continuous variables ) which are of late rarely used. The digital computer operates by counting and it deals with the discrete variables. There is a combined form called Hybrid computer, which has both features. Based on application computers are classified as special purpose computers and general computers. As the name tells special computers are designed to perform certain specific tasks where as the other category is designed to cater the needs of variety of users. Basic structure of a digital computer

The main components of a computer are Input unit (IU), Central Processing unit (CPU) and Output unit (OU). The information like data ,

4

programs etc are passed to the computer through input devices. The keyboard, mouse, floppy disk, CD, DVD, joystick etc are certain input devices. The output device is to get information from a computer after processing . VDU (Visual Display Unit), Printer, Floppy disk, CD etc are output devices.

The brain of a computer is CPU. It has three components- Memory unit, Control unit and Arithmetic and Logical unit (ALU)- Memory unit also called storage

You May Also Find These Documents Helpful

  • Satisfactory Essays

    CPU is the Central Processing Unit. This is the key component or even the “brain” of the computer. The CPU carries out all the instructions and every single instruction must go through the CPU prior to being performed. It executes arithmetic, logical and input/output operations.…

    • 204 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Unit 16 Ao1

    • 529 Words
    • 3 Pages

    All programs are written to do something, their purpose may be to perform a calculation or to run a computer game, but all programs will perform a task, also known as a process. All programs take the stricter of input, process to output. Th input includes user controls such as keyboard, mouse, game controller, voice and so on. It will also include data from the user, computer or other programs.…

    • 529 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Coding

    • 335 Words
    • 2 Pages

    of any impingements. The camera was then removed from the subacromial space. The area was then infiltrated with Marcaine. The posterior portal was then closed with absorbable sutures and Steri-Strips, and a Mepore dressing was placed on it. The arm was then placed in a sling; the patient awakened and was placed on her hospital bed and taken to the recovery room in good…

    • 335 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    In every computer contains several components and works as team to perform certain operations and task. The following are the main components that make up a computer (Venit & Drake, 2007):…

    • 1318 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Programming

    • 3038 Words
    • 13 Pages

    2. Each of the flowchart segments in Figure 3-35 is unstructured. Redraw each flowchart segment so that it does the same thing but is structured.…

    • 3038 Words
    • 13 Pages
    Good Essays
  • Powerful Essays

    This section reviews some basic important functions needed for this course under MSDOS (Microsoft Disk Operating System) and learn how to write C++ programs. Creating source codes and compiling them will be the most frequent activity that you will do. You will learn about how to use CodeBlocks to create source codes and compile them and execute the output.…

    • 876 Words
    • 4 Pages
    Powerful Essays
  • Powerful Essays

    C++ and Lt

    • 2169 Words
    • 9 Pages

    C++ I/O occurs in streams, which are sequences of bytes. If bytes flows from a device like a keyboard, a disk drive, or a network connection etc. to main memory, this is called input operation and if bytes flows from main memory to a device like a display screen, a printer, a disk drive, or a network connection, etc, this is called output operation.…

    • 2169 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    C++ Programs

    • 716 Words
    • 3 Pages

    2. Write a program in C++ that calculates the value of π from the infinite series…

    • 716 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    b) Write a program in C to check whether a given system is ANSI C complaint or…

    • 273 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Programming

    • 3434 Words
    • 14 Pages

    Keyboard shortcuts are combinations of two or more keys that, when pressed, can be used to perform a task that would typically require a mouse or other pointing device. Keyboard shortcuts can make it easier to interact with your computer, saving you time and effort as you work with Windows and other programs.…

    • 3434 Words
    • 14 Pages
    Good Essays
  • Powerful Essays

    Lecture 1 Introduction Copy

    • 1329 Words
    • 19 Pages

    CS242 computer Programming T.Fatimah Al-Qahtani Details • Textbook: • C++ How to Program, DETITEL & DEITEL, eighth(or) seventh edition. 2 • Website : • http://cpp242.wordpress.com 3 • Contact me : 1- office Hours : Sunday from ( 12:30 to 3:30 p.m.)…

    • 1329 Words
    • 19 Pages
    Powerful Essays
  • Powerful Essays

    processor essay

    • 1265 Words
    • 6 Pages

    Every PC has a Central Processing Unit (CPU) this acts as the brain of your system. It connects to the Motherboard and works alongside the other components processing many instructions at the same time between the different hardware and memory systems.…

    • 1265 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    programming

    • 761 Words
    • 4 Pages

    Allâh (swt) says in the Qur'ân: "No kind of calamity can occur, except by the will…

    • 761 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    Computer Programming

    • 2142 Words
    • 7 Pages

    Computer programming (often shortened to programming) is a process that leads from an original formulation of a computing problem to executable programs. It involves activities such as analysis, understanding, thinking, and generically solving such problems resulting in an algorithm, verification of requirements of the algorithm including its correctness and its resource consumption, implementation (commonly referred to as coding[1][2]) of the algorithm in a target programming language. Source code is written in one or more programming languages (such as C, C++, C#,Java, Python, Smalltalk, JavaScript, etc.). The purpose of programming is to find a sequence of instructions that will automate performing a specific task or solve a given problem.[citation needed] The process of programming thus often requires expertise in many different subjects, including knowledge of the application domain, specialized algorithmsand formal logic.…

    • 2142 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    Definition of computers

    • 616 Words
    • 3 Pages

    The computer is made up of 4 basic parts which are the monitor, system Unit, mouse and keyboard.…

    • 616 Words
    • 3 Pages
    Satisfactory Essays