Table of Contents

  1. Cover
  2. Title Page
  3. Copyright Page
  4. Dedication Page
  5. About the Author
  6. About the Reviewer
  7. Acknowledgement
  8. Preface
  9. Table of Contents
  10. 1. The Computer
    1. Introduction
    2. Structure
    3. Objectives
    4. The computer
    5. Block diagram of functional units/components of the computer
      1. Input unit
      2. Output unit
      3. Processing unit
      4. Memory unit
    6. Data and information
    7. Classification of computers
      1. Classification based on time or historical development
        1. Zero-generation computers (up to 1945)
        2. First generation computers (1946–1956)
        3. Second generation computers (1956–1963)
        4. Third Generation Computer (1964–1971)
        5. Fourth-generation computers (1971–1989)
        6. Fifth-generation computers (1989 till present)
      2. Classification based on the purpose
        1. General purpose computers
        2. Special purpose computers
      3. Classification based on the technology used
        1. Analog computers
        2. Digital computers
        3. Hybrid computers
      4. Classification based on the number of users
    8. Computer characteristics
    9. Advantages of the computer
    10. Limitations of computer
    11. Applications of computer
    12. Conclusion
    13. Points to remember
    14. Important questions
  11. 2. The CPU and the Memory
    1. Introduction
    2. Structure
    3. Objectives
    4. The CPU
    5. Components of the CPU
      1. ALU
      2. CU
      3. Registers
    6. The instruction on CPU: Working of CPU
      1. Steps performed for the execution of single instruction
    7. The CPU speed
      1. The clock speed
      2. The total number of processor cores
      3. Cache memory
    8. The memory unit
      1. Primary memory
        1. RAM
        2. ROM
      2. Secondary memory
        1. Serial accessed memory: Magnetic tape
        2. Semi-random accessed memory
    9. Memory hierarchy
    10. Measuring the memory
    11. Solved examples based on the inter-conversion of memory units
    12. Conclusion
    13. Points to remember
    14. Important questions
  12. 3. The Computer Software
    1. Introduction
    2. Structure
    3. Objectives
    4. Computer software
    5. Examples of system software
    6. Classifications of software dependent on proprietary rights
    7. Operating system
      1. UNIX OS structure
    8. The operating system as a resource manager
    9. Classification of the operating system
      1. Based on the user interface
      2. Based on the number of users
      3. Based on the execution of the program
        1. Sequentially execution of the program or serial processing
        2. Batch processing operating system
        3. Multiprogramming operating system
        4. Multitasking OS through time-sharing
        5. Multithreading operating system
        6. Multiprocessing operating system
        7. Distributed operating system
        8. Network operating system
        9. Real-time operating system
      4. Language translator
      5. The malware
    10. Conclusion
    11. Points to remember
    12. Important questions
  13. 4. The Number System
    1. Introduction
    2. Structure
    3. Objectives
    4. Number system
      1. Binary number system
      2. Decimal number system
      3. Octal number system
      4. Hexadecimal number system
    5. Conversions from the decimal system to another
      1. Decimal to binary
      2. Decimal to octal
      3. Decimal to hexadecimal
    6. Conversions from another number system to decimal
      1. Binary to decimal
      2. Octal to decimal
      3. Hexadecimal to decimal
    7. Number system conversions, excluding decimal
    8. Fractional numbers
      1. Binary fractional numbers into decimal
      2. Octal fractional numbers into decimals
      3. Hexadecimal fractional numbers into decimal
      4. Decimal fraction number to binary
      5. Decimal fraction number to octal
      6. Decimal fraction number to hexadecimal
    9. Direct conversion methods
      1. Binary to decimal
      2. Decimal to binary
      3. Binary to octal
      4. Binary to hexadecimal
    10. Operations on binary numbers
      1. Addition
      2. Subtraction
      3. Multiplication
      4. Division
      5. One’s complement
      6. Two’s complement
      7. Subtraction using two’s complement
      8. Negative binary number or signed number representation
    11. Other popular codes
      1. ASCII
      2. BCD
      3. EBCDIC
      4. Excess-3
      5. Gray code
    12. Conclusion
    13. Points to remember
    14. Important questions
  14. 5. Problem-solving Techniques
    1. Introduction
    2. Structure
    3. Objectives
    4. Problem-solving
      1. Steps for logical and numerical problem-solving
        1. Solving a logical problem
        2. Solving a numerical problem
    5. Problem-solving techniques
      1. Algorithm
        1. Characteristics of an algorithm
      2. Flowcharts
      3. Pseudocodes
    6. Programming language
    7. Language translator
      1. Functions of the compiler
      2. Functions of assembler
    8. Compiling and executing process
    9. Syntax and logical errors in the compilation
    10. Files generated in the C program lifecycle
    11. Conclusion
    12. Points to remember
    13. Important questions
  15. 6. Fundamentals of C
    1. Introduction
    2. Structure
    3. Objectives
    4. Introduction to C
    5. History of C language
    6. Why C?
    7. Learning of C
    8. C characters or symbols set
      1. Whitespace characters or escape sequences
      2. Format specifiers
    9. Tokens in C
      1. Classification of tokens in C
      2. Keywords
      3. Variables
      4. Constant
        1. Integer constant
        2. Real constant
        3. Character constant
        4. String constant
      5. Identifiers
      6. Operators
      7. Special symbols
    10. The general structure of the C program
    11. First C program
      1. Description of the preceding program
        1. Comments
        2. printf() and scanf() functions
    12. How to compile and run the C program?
    13. Header files
    14. Data types
      1. Primary data types
        1. Character
        2. Integer
        3. Real data type
        4. Double data type
        5. Void
      2. Derived data types
    15. Data type modifiers
    16. Type conversion or type casting
    17. Variable declaration versus definition
    18. Conclusion
    19. Points to remember
    20. Important questions
  16. 7. Operators and Expressions
    1. Introduction
    2. Structure
    3. Objectives
    4. Operators and expressions
    5. Operators based on operand count
    6. Operators based on operation type
      1. Arithmetic operators
      2. Increment and decrement operators
      3. Relational operators
      4. Logical operators
      5. Bitwise operators
      6. Shift operators
      7. Comma operator
      8. The sizeof( ) operator
      9. Assignment operators
      10. Conditional operator
      11. Address operator
    7. Precedence and associativity of operators in C
    8. Conclusion
    9. Points to remember
    10. Important questions
  17. 8. Decision-making Statements
    1. Introduction
    2. Structure
    3. Objectives
    4. Decision-making statements
    5. Types of decision-making statements
      1. Conditional decision-making statements
      2. Unconditional decision-making statements
    6. Roots of a quadratic equation
    7. Solved programs for practice on decision-making
    8. Conclusion
    9. Points to remember
    10. Important questions
  18. 9. Loop
    1. Introduction
    2. Structure
    3. Objectives
    4. Loop
    5. Types of loop
      1. for loop
      2. while loop
      3. do-while loop
      4. Nested loop
      5. The infinite loop
    6. Programs on loops for practice
    7. Conclusion
    8. Points to remember
    9. Important questions
  19. 10. Array
    1. Introduction
    2. Structure
    3. Objectives
    4. Array
    5. Declaration of array
    6. Initialization of array
      1. Method 1: Direct assignment of the element
        1. Accessing the elements of the array
      2. Method 2: Initialization of the array at a time
      3. Method 3: Initialization of array using a loop
    7. Finding the address of the array element
    8. Types of the array
      1. One or single-dimensional array
      2. Multi-dimensional array
        1. 2D array
        2. 3D array
    9. Properties of array
    10. The advantage of using an array
    11. Solved programs for practice based on the array
    12. Conclusion
    13. Points to remember
    14. Important questions
  20. 11. String
    1. Introduction
    2. Structure
    3. Objectives
    4. String
    5. Declaration and initialization of string
      1. Method 1: Character-by-character method
      2. Method 2: Direct method
      3. Method 3: Initialization by index
    6. Limitation of scanf function
    7. Standard inbuilt string functions
      1. strlen()
      2. strcat()
      3. strcmp()
      4. strcpy()
      5. strrev()
      6. strupr()
      7. strlwr()
      8. strncat()
      9. strncpy()
      10. strncmp()
    8. 2D string
    9. The ctype.h header file
    10. Solved programs for practice based on string
    11. Conclusion
    12. Points to remember
    13. Important questions
  21. 12. Function
    1. Introduction
    2. Structure
    3. Objectives
    4. Function
    5. Need of the function
    6. Types of function
    7. Types of parameters
    8. Types of function based on function parameters
      1. Call by value
        1. Introduction to pointers
      2. Call by reference
    9. Calling convention
    10. Passing arrays to functions
    11. Storage classes in C
    12. Solved programs for practice based on function
    13. Conclusion
    14. Points to remember
    15. Important questions
  22. 13. Recursion
    1. Introduction
    2. Structure
    3. Objectives
    4. Recursion
    5. Finding the factorial of a number
    6. Fibonacci series
    7. Ackermann function
    8. Merge sort
      1. Algorithm for merge sort
    9. Quick sort
      1. Algorithm for quick sort
    10. Conclusion
    11. Points to remember
    12. Important questions
  23. 14. Structure and Union
    1. Introduction
    2. Structure
    3. Objectives
    4. Defining a structure
    5. Accessing the structure element
    6. Initialization of the structure
    7. An array of structures
    8. Structure with pointer
      1. Declaration of the structure pointer
      2. Initialization of the structure pointer
      3. Access structure member using a pointer:
    9. Union
    10. Nested structure
    11. Passing structure in a function
    12. Conclusion
    13. Points to remember
    14. Important questions
  24. 15. Searching and Sorting
    1. Introduction
    2. Structure
    3. Objectives
    4. Searching
    5. Linear searching
      1. Algorithm for linear search
    6. Binary search
      1. Algorithm for binary search
    7. Sorting algorithms
      1. Bubble sort
        1. Algorithm
      2. Selection sort
        1. Algorithm
      3. Insertion sort
        1. Algorithm
    8. Conclusion
    9. Points to remember
    10. Important questions
  25. 16. Pointers
    1. Introduction
    2. Structure
    3. Objectives
    4. Pointer
    5. Initialization of pointer
      1. Accessing the value
    6. Operations on pointers
    7. Pointer to a pointer
    8. NULL pointer
    9. Generic pointer
    10. Pointer to an array
    11. Array of pointers
    12. Self-referential structure
    13. Linked list
    14. Conclusion
    15. Points to remember
    16. Important questions
  26. 17. The Console Input-output Functions
    1. Introduction
    2. Structure
    3. Objectives
    4. The console input–output functions
    5. printf()
    6. scanf()
      1. Limitations of scanf()
    7. getch(), getche(), and putch()
    8. getchar() and putchar()
    9. fgetchar() and fputchar()
    10. gets() and puts()
    11. Use of fflush(stdin)
    12. Conclusion
    13. Points to remember
    14. Important questions
  27. 18. Preprocessor
    1. Introduction
    2. Structure
    3. Objectives
    4. Preprocessor
    5. Preprocessor directives
      1. File inclusion directives
      2. Macro expansion directives
        1. The difference between macro and function
      3. Conditional directives
        1. #ifdef and #endif
        2. #if and #endif
      4. Undefined directives
        1. #undef
    6. Conclusion
    7. Points to remember
    8. Important questions
  28. 19. File Handling in C
    1. Introduction
    2. Structure
    3. Objectives
    4. File
    5. Need of the file
    6. Types of files
    7. Operations on file through the inbuilt functions
      1. Opening a file
      2. Reading a file
      3. Closing a file
      4. Deleting a file
    8. Memory allocation
      1. malloc()
      2. calloc()
      3. free()
      4. realloc()
    9. Conclusion
    10. Points to remember
    11. Important questions
  29. 20. Time and Space Complexity
    1. Introduction
    2. Structure
    3. Objectives
    4. Algorithm
    5. Algorithm analysis
      1. Why algorithm analysis?
    6. Asymptotic notation
      1. Big-Oh
        1. How to choose the value of C and k?
      2. Omega
      3. Theta
    7. Why Big-oh?
    8. Measuring the time complexity
    9. Measuring the space complexity
    10. Relationship between the Big-Oh asymptotic notations
    11. Time complexity
    12. Space complexity
    13. Conclusion
    14. Points to remember
    15. Important questions
  30. Index
  1. Table of Contents