You are previewing Computer Programming and IT.
O'Reilly logo
Computer Programming and IT

Book Description

Computer Programming and IT is a student-friendly, practical and example-driven book that gives students a solid foundation in the basics of computer programming and information technology. The contents have been designed to correspond with the requirements of courses in computer programming and IT. A rich collection of solved examples makes this book indispensable for students.

Table of Contents

  1. Cover
  2. Title Page
  3. Contents
  4. About the Author
  5. Preface
  6. Chapter 1. Introduction to Computers
    1. 1.1 Introduction
    2. 1.2 Characteristics of Computers
    3. 1.3 Evolution of Computers
    4. 1.4 Computer Generations
    5. 1.5 Classification of Computers
    6. 1.6 Application of Computers
    7. 1.7 Basic Computer Organization
    8. 1.8 Stored Program Architecture of a Computer
    9. 1.9 Evolution of Processors
    10. Summary
    11. Exercises
  7. Chapter 2. Computer Memory and Storage
    1. 2.1 Introduction
    2. 2.2 Memory Hierarchy
    3. 2.3 Random Access Memory (RAM)
    4. 2.4 Read Only Memory (ROM)
    5. 2.5 RAM, ROM, and CPU Interaction
    6. 2.6 Types of Secondary Storage Devices
    7. 2.7 Magnetic Tape
    8. 2.8 Magnetic Disk
    9. 2.9 Types of Magnetic Disks
    10. 2.10 Optical Disk
    11. 2.11 Types of Optical Disks
    12. 2.12 Magneto-Optical Storage Devices
    13. 2.13 Universal Serial Bus (USB)
    14. 2.14 Memory Stick
    15. 2.15 Mass Storage Devices
    16. Summary
    17. Exercises
  8. Chapter 3. Computer Software
    1. 3.1 Introduction
    2. 3.2 Software
    3. 3.3 Types of Software
    4. 3.4 Software Terminologies
    5. 3.5 Installing and Uninstalling Software
    6. 3.6 Software Piracy
    7. 3.7 Starting a Computer (Booting)
    8. 3.8 Software Development Steps
    9. Summary
    10. Exercises
  9. Chapter 4. Computer Programming and Languages
    1. 4.1 Introduction
    2. 4.2 Problem-Solving Techniques
    3. 4.3 Program Control Structures
    4. 4.4 Programming Languages
    5. 4.5 Generations of Programming Languages
    6. 4.6 Language Translators
    7. 4.7 Features of a Good Programming Language
    8. Summary
    9. Exercises
  10. Chapter 5. Number Systems and Binary Codes
    1. 5.1 Introduction
    2. 5.2 Binary Addition Arithmetic
    3. 5.3 Arithmetic Number Representations
    4. 5.4 Binary Subtraction
    5. 5.5 Binary Multiplication of Unsigned Numbers
    6. 5.6 Multiplication Method When Multiplier is 2n Where n is an Integer
    7. 5.7 Multiplication Method When Multiplier is a Small Number
    8. 5.8 Multiplication Method for n-Bit by N-Bit Signed Numbers,X and Y
    9. 5.9 Binary Arithmetic Division by Successive Subtraction Method
    10. 5.10 Floating Point Numbers
    11. 5.11 Code Converters
    12. 5.12 Equality and Magnitude Comparators Between Two 4-Bit Numbers
    13. 5.13 Odd Parity and Even Parity Generators
    14. 5.14 The 4-Bit AND, OR, XOR Between Two Words
    15. Summary
    16. Exercises
  11. Chapter 6. Introduction to C
    1. 6.1 Introduction
    2. 6.2 Overview of Compilers and Interpreters
    3. 6.3 Structure of a C Program
    4. 6.4 Intermediate Code
    5. 6.5 Object and Executable Codes
    6. 6.6 Programming Rules
    7. 6.7 Importance of Braces ({ }) in a C Program
    8. 6.8 Executing the Program
    9. 6.9 Flowchart for the Execution of a C Program
    10. Summary
    11. Exercises
  12. Chapter 7. The C Declarations
    1. 7.1 Introduction
    2. 7.2 C Character Set
    3. 7.3 Delimiters
    4. 7.4 C Keywords
    5. 7.5 Identifiers
    6. 7.6 Constants
    7. 7.7 Variables
    8. 7.8 Rules for Defining Variables
    9. 7.9 Data Types
    10. 7.10 Declaring Variables
    11. 7.11 Initializing Variables
    12. 7.12 Dynamic Initialization
    13. 7.13 Type Conversion
    14. 7.14 Constant and Volatile Variables
    15. Summary
    16. Exercises
  13. Chapter 8. Operators and Expressions
    1. 8.1 Introduction
    2. 8.2 Expressions
    3. 8.3 Properties of Operators
    4. 8.4 Priority of Operators and their Clubbing
    5. 8.5 Comma and Conditional Operators
    6. 8.6 Arithmetic Operators
    7. 8.7 Relational Operators
    8. 8.8 Logical Operators
    9. 8.9 Bitwise Operators
    10. Summary
    11. Exercises
  14. Chapter 9. Input, Output, and Control Loop Statements
    1. 9.1 Introduction
    2. 9.2 Input and Output Functions
    3. 9.3 Formatted Functions
    4. 9.4 Flags, Width, and Precision with the Format String
    5. 9.5 Unformatted Functions
    6. 9.6 Commonly used Library Functions
    7. 9.7 Control Structures
    8. 9.8 if Statement
    9. 9.9 if-else Statement
    10. 9.10 Nestedif-else Statements
    11. 9.11 switchStatement
    12. 9.12 What is a Program Loop?
    13. 9.13 for Loop
    14. 9.14 Nested for Loops
    15. 9.15 while Loop
    16. 9.16 do-while Loop
    17. 9.17 do-while Statement with while Loop
    18. 9.18 break Statement
    19. 9.19 continue Statement
    20. 9.20 go to Statement
    21. Summary
    22. Exercises
  15. Chapter 10. Storage Class
    1. 10.1 Introduction
    2. 10.2 Scope of a Variable
    3. 10.3 Automatic Variables
    4. 10.4 External Variables
    5. 10.5 Static Variables
    6. 10.6 Register Variables
    7. Summary
    8. Exercises
  16. Chapter 11. Preprocessor Directives
    1. 11.1 Introduction
    2. 11.2 Macro Substitution
    3. 11.3 The#defineDirective
    4. 11.4 Undefining a Macro
    5. 11.5 Token Pasting and Stringising Operators
    6. 11.6 The#includeDirective
    7. 11.7 Conditional Compilation
    8. 11.8 The#ifndefDirective
    9. 11.9 The#errorDirective
    10. 11.10 The#lineDirective
    11. 11.11 TheinlineDirective
    12. 11.12 The#pragmaSaveregs
    13. 11.13 The#pragmaDirective
    14. 11.14 The Predefined Macros in ANSI and Turbo-C
    15. 11.15 Standard I/O Predefined Streams instdio.h278
    16. 11.16 The Predefined Macros in ctype.h
    17. 11.17 Assertions
    18. Summary
    19. Exercises
  17. Chapter 12. Arrays
    1. 12.1 Introduction
    2. 12.2 Array Initialization
    3. 12.3 Definition of an Array
    4. 12.4 Characteristics of an Array
    5. 12.5 One-Dimensional Array
    6. 12.6 Predefined Streams
    7. 12.7 Two-Dimensional Array
    8. 12.8 Three- or Multi-Dimensional Arrays
    9. 12.9 Thesscanf()andsprintf() Functions
    10. 12.10 Operations with Arrays
    11. Summary
    12. Exercises
  18. Chapter 13. Pointers
    1. 13.1 Introduction
    2. 13.2 Features of Pointers
    3. 13.3 Pointer Declaration
    4. 13.4 Arithmetic Operations with Pointers
    5. 13.5 Pointers and Arrays
    6. 13.6 Pointers and Two-Dimensional Arrays
    7. 13.7 Array of Pointers
    8. 13.8 void Pointers
    9. Summary
    10. Exercises
  19. Chapter 14. Dynamic Memory Allocation
    1. 14.1 Dynamic Memory Allocation
    2. 14.2 Memory Models
    3. 14.3 Dynamic Memory Management Functions
    4. Summary
    5. Exercises
  20. Chapter 15. Structure and union
    1. 15.1 Introduction
    2. 15.2 Features of Structures
    3. 15.3 Definition, Declaration, and Initialization of Structure
    4. 15.4 Structure Within Structure
    5. 15.5 Array of Structures
    6. 15.6 Pointer to Structure
    7. 15.7 Structure and Functions
    8. 15.8 typedef
    9. 15.9 Bit Fields
    10. 15.10 Enumerated Data Type
    11. 15. 11 union
    12. 15. 12 Calling BIOS and DOS Services
    13. 15. 13 unionof Structures
    14. Summary
    15. Exercises
  21. Chapter 16. Files
    1. 16.1 Introduction
    2. 16.2 Streams and File Types
    3. 16.3 Steps for File Operations
    4. 16.4 File I/O
    5. 16.5 Command Line Arguments
    6. 16.6 Applications of Command Line Arguments
    7. Summary
    8. Exercises
  22. Chapter 17. Functions
    1. 17.1 Introduction
    2. 17.2 Definition of Function
    3. 17.3 Definition of Syntax Function and Function Prototypes
    4. 17.4 ThereturnStatement
    5. 17.5 Types of Functions
    6. 17.6 Call by Value and Reference
    7. 17.7 Function Returning More Values
    8. 17.8 Function as an Argument
    9. 17.9 Function with Operators
    10. 17.10 Function and Decision Statements
    11. 17.11 Function and Loop Statements
    12. 17.12 Functions with Arrays and Pointers
    13. 17.13 Passing Characters and String to Function
    14. 17.14 Recursion
    15. 17.15 Pointer to Function
    16. Summary
    17. Exercises
  23. Chapter 18. Working with Strings and Standard Functions
    1. 18.1 Introduction
    2. 18.2 Declaration and Initialization of String
    3. 18.3 Display of Strings with Different Formats
    4. 18.4 String Standard Functions
    5. Summary
    6. Exercises
  24. Appendix: American Standard Code for Information Interchange
  25. Acknowledgments
  26. Copyright