1st Edition

C Programming Learn to Code

By Sisir Kumar Jena Copyright 2022
    452 Pages 280 B/W Illustrations
    by Chapman & Hall

    452 Pages 280 B/W Illustrations
    by Chapman & Hall

    The C programming language is a popular language in industries as well as academics. Since its invention and standardized as ANSI C, several other standards known as C99, C11, and C17 were published with new features in subsequent years. This book covers all the traits of ANSI C and includes new features present in other standards. The content of this book helps a beginner to learn the fundamental concept of the C language. The book contains a step-by-step explanation of every program that allows a learner to understand the syntax and builds a foundation to write similar programs. The explanation clarity, exercises, and illustrations present in this book make it a complete textbook in all aspects.

    Features:

    • Other than ANSI C, the book explains the new C standards like C99, C11, and C17.
    • Most basic and easy-to-follow programs are chosen to explain the concepts and their syntax.
    • More emphasis is given to the topics like Functions, Pointers, and Structures.
    • Recursion is emphasized with numerous programming examples and diagrams.
    • A separate chapter on the command-line argument and preprocessors is included that concisely explains their usage.
    • Several real-life figures are taken to explain the concepts of dynamic memory allocation, file handling, and the difference between structure and union.
    • The book contains more than 260 illustrations, more than 200 programs, and exercises at the end of each chapter.

    This book serves as a textbook for UG/PG courses in science and engineering. The researcher, postgraduate engineers, and embedded software developers can also keep this book as reference material for their fundamental learning.

    1 Introduction to Computer. 1.1 Introduction. 1.2 Definition and Characteristics of a Computer System. . 1.3. History of Computer. . 1.4 Basic Computer Organization. 1.5 Computer Memory. 1.6 Introduction to Operating System. 1.7 Review Questions. 2 Number System. 2.1 Introduction. 2.2 Positional Number System. 2.3 Number Conversion. 2.4 Review Questions. . 3 Problem Solving through Flowchart and Algorithm. 2.1 Introduction. 2.2 Problem Solving Approach. 2.3 Algorithm Design. 2.4 Basics of an Algorithm. 2.5 Flowchart. 2.6 Example Problems. 2.7 Basics of Programming Language. 2.8 Review Questions. . 4 Introduction to C Programming. 4.1 Introduction. 4.2 History of C. 4.3 Executing a C Program. 4.4 Structure of a C Program. 4.5 Compilers and Editors to Execute C Program. 4.6 Review Questions. . 5 Constants, Variables, and Data Types. 5.1 Introduction. 5.2 C Character Set. 5.3 Keywords. 5.4 Variables and Identifiers. 5.5 Data Types. 5.6 Declaration of Variables. 5.7 Constants. 5.8 Learn to Code Examples. 5.9 Escape Sequences. 5.10 Review Questions. . 6 Operators and Expressions. 6.1 Introduction. 6.2 Arithmetic Operator. 6.3 Relational Operator. 6.4 Assignment Operator. 6.5 Logical Operator. 6.6 Increment and Decrement Operator. 6.7 Conditional Operator. 6.8 Bitwise Operator. 6.9 Special Operators. 6.10 Expressions. 6.11 Type Conversion. 6.12 Operator Precedence and Associativity. 6.13 Review Questions. . 7 Basic Input Output. 7.1 Introduction. 7.2 Unformatted Functions. 7.3 Formatted Functions. 7.4 Review Questions. . 8 Control Structure. 8.1 Introduction. 8.2 Selection with if statement. 8.3 if-else Statement. 8.4 Nested if-else Statement. 8.5 If-else-if Ladder. 8.6 Compound Statement. 8.7 Multiway Selection with switch Statement. 8.8 goto Statement . 8.9 Introduction to Looping. 8.10 while Loop. 8.11 do-while Loop. 8.12 for Loop. 8.13 Unconditional branching: break and continue. 8.14 Review Questions. . 9 Function. 9.1 Introduction. 9.2 Need of functions. 9.3 Types of Function. 9.4 User Defined Function. 9.5 Component and Working of a Function. 9.6 Categories of a Function. 9.7 Recursion. 9.8 Storage Classes. 9.9 Review Question. . 10 Arrays and Strings. 10.1 Introduction. 10.2 Need of an Array. 10.3 Types of Array. 10.4 One Dimensional Array. 10.5 Two Dimensional Array. 10.6 Multidimensional Array. 10.7 Character array: String. 10.8 String Functions. 10.9 Review Questions. . 11 Pointers. 11.1 Introduction. 11.2 Basic Knowledge. 11.3 Pointer Variable. 11.4 Pointer to Pointer (Double Pointer). 11.5 Void Pointer. 11.6 Null Pointer. 11.7 Constant Pointer. 11.8 Pointer Arithmetic. 11.9 Pointers and Functions. 11.10 Pointers and Arrays. 11.11 Passing Arrays to Function. 11.12 Pointers and Two Dimensional array. 11.13 Pointer and String. 11.14 Arrays of Pointers. 11.15 Pointers to Function. 11.16 Review Questions. . 12 Structure and Union. 12.1 Introduction. 12.2 Declaring Structure. 12.3 Initializing structure. 12.4 Accessing Structure elements. 12.5 Learn to Code Examples. 12.6 Array of Structures. 12.7 Structure within Structure (Nested Structure). 12.8 User defined Data Type: typedef. 12.9 Pointers and Structures. 12.10 Structure and Function. 12.11 Unions. 12.12 Structure VS Union. 12.13 Bit Fields. 12.14 Enumeration. 12.15 Review Questions. . 13 Dynamic Memory Allocation. 13.1 Introduction. 13.2 Types of Memory Allocation. 13.3 Dynamic Memory Allocation Process. 13.4 Review Questions. . 14 File Handling. 14.1 Introduction. 14.2 Basics of File I/O. 14.3 Opening a File. 14.4 Closing a File. 14.5 File Functions with Examples. 14.6 Review Questions. . 15 The Preprocessor. 15.1 Introduction. 15.2 Preprocessor Directives. 15.3 Macro Substitutions. 15.4 #include Preprocessor. 15.5 Conditional Preprocessors. 15.6 Other Preprocessor Directives. 15.7 Review Questions. . 16 Command Line Arguments. 16.1 Introduction. 16.2 Executing a Program using Command Prompt. 16.3 Fundamentals of Command Line Argument. 16.4 Using Command Line Argument. 16.5 Review Questions.

    Biography

    Sisir Kumar Jena is presently working as an Assistant Professor in the Department of CSE, DIT University, Dehradun. He was the HOD and Assistant Professor in the Department of CSE at Nalanda Institute of Technology, Bhubaneswar, India, during 2007-2015. He has more than 10 years of teaching experience and five years of experience as a Research Scholar at IIT Guwahati. He is pursuing his Ph.D. in Computer Science and Engineering at IIT, Guwahati, while writing this book. He has published many research papers and book chapters in refereed International Conferences and Journals. His interest area includes Digital VLSI Design and Testing, Approximate Computing, IoT, and Security in Hardware.