Introduction to C Programming
Home > Computing and Information Technology > Computer programming / software engineering > Introduction to C Programming
24%
Introduction to C Programming

Introduction to C Programming


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Introduction to C Programming is designed to serve as a textbook for students of engineering, computer applications, and computer science for a basic course on C programming. The aim of the book is to enable students to write effective C programs. The book starts with an introduction to programming in general followed by a detailed introduction to C programming. It then delves into a complete analysis of various constructs of C such as decision control and looping statements, functions, arrays, strings, pointers, structure and union, file management, and preprocessor directives. It also provides a separate chapter on linked list detailing the various kinds of linked lists and how they are used to allocate memory dynamically. A highly detailed pedagogical approach is followed throughout the book, which includes plenty of examples, figures, programming tips, keywords, and end-chapter exercises which make this book an ideal resource for students to master and fine-tune the art of writing C programs.

Table of Contents:
PREFACE ; BRIEF CONTENTS ; 1. INTRODUCTION TO PROGRAMMING 1 ; 1.1 INTRODUCTION TO COMPUTER SOFTWARE 1 ; 1.2 CLASSIFICATION OF COMPUTER SOFTWARE 2 ; SYSTEM SOFTWARE?2 ; APPLICATION SOFTWARE?5 ; 1.3 PROGRAMMING LANGUAGES?6 ; 1.4 GENERATION OF PROGRAMMING LANGUAGES?6 ; FIRST GENERATION: MACHINE LANGUAGE?6 ; SECOND GENERATION: ASSEMBLY LANGUAGE?7 ; THIRD GENERATION PROGRAMMING LANGUAGE?8 ; FOURTH GENERATION: VERY HIGH-LEVEL LANGUAGES?8 ; FIFTH GENERATION PROGRAMMING LANGUAGE?9 ; 2. INTRODUCTION TO C 12 ; 2.1 INTRODUCTION?12 ; BACKGROUND?12 ; CHARACTERISTICS OF C?13 ; USES OF C?14 ; 2.2 STRUCTURE OF A C PROGRAM?14 ; 2.3 WRITING THE FIRST C PROGRAM?15 ; 2.4 FILES USED IN A C PROGRAM?16 ; SOURCE CODE FILE?16 ; HEADER FILES?16 ; OBJECT FILES?17 ; BINARY EXECUTABLE FILE?17 ; 2.5 COMPILING AND EXECUTING C PROGRAMS?17 ; 2.6 USING COMMENTS?18 ; 2.7 KEYWORDS?19 ; 2.8 IDENTIFIERS?20 ; RULES FOR FORMING IDENTIFIER NAMES?20 ; 2.9 BASIC DATA TYPES IN C?20 ; HOW ARE FLOAT AND DOUBLE STORED??21 ; 2.10 VARIABLES?22 ; NUMERIC VARIABLES?22 ; CHARACTER VARIABLES?22 ; DECLARING VARIABLES?22 ; INITIALIZING VARIABLES?23 ; 2.11 CONSTANTS?23 ; INTEGER CONSTANT?23 ; FLOATING POINT CONSTANT?24 ; CHARACTER CONSTANT?24 ; STRING CONSTANT?24 ; DECLARING CONSTANTS?24 ; 2.12 INPUT/OUTPUT STATEMENT IN C?25 ; STREAMS?25 ; FORMATTING INPUT/OUTPUT?25 ; PRINTF()?26 ; SCANF()?28 ; EXAMPLES PRINTF/SCANF?30 ; DETECTING ERRORS DURING DATA INPUT?33 ; 2.13 OPERATORS IN C?33 ; ARITHMETIC OPERATORS?33 ; RELATIONAL OPERATORS?35 ; EQUALITY OPERATORS?36 ; LOGICAL OPERATORS?36 ; UNARY OPERATORS?37 ; CONDITIONAL OPERATOR?39 ; BITWISE OPERATORS?40 ; ASSIGNMENT OPERATORS?41 ; COMMA OPERATOR?42 ; SIZEOF OPERATOR?42 ; OPERATOR PRECEDENCE CHART?42 ; 2.14 PROGRAMMING EXAMPLES?45 ; 2.15 TYPE CONVERSION AND TYPE CASTING?48 ; TYPE CONVERSION?49 ; TYPECASTING?50 ; ANNEXURE 1?60 ; 3. DECISION CONTROL AND LOOPING STATEMENTS 63 ; 3.1INTRODUCTION TO DECISION CONTROL STATEMENTS?63 ; 3.2CONDITIONAL BRANCHING STATEMENTS?63 ; IF STATEMENT?64 ; IF-ELSE STATEMENT?65 ; IF-ELSE-IF STATEMENT?68 ; SWITCH CASE?72 ; 3.3ITERATIVE STATEMENTS?76 ; WHILE LOOP?76 ; DO-WHILE LOOP?79 ; FOR LOOP?82 ; 3.4NESTED LOOPS?86 ; 3.5THE BREAK AND CONTINUE STATEMENT?96 ; THE BREAK STATEMENT?96 ; THE CONTINUE STATEMENT?96 ; 3.6GOTO STATEMENT?98 ; CASE STUDY FOR CHAPTERS 2 AND 3?111 ; 4. FUNCTIONS 117 ; 4.1INTRODUCTION?117 ; WHY ARE FUNCTIONS NEEDED??118 ; 4.2 USING FUNCTIONS?119 ; 4.3 FUNCTION DECLARATION/FUNCTION PROTOTYPE?119 ; 4.4 FUNCTION DEFINITION?120 ; 4.5 FUNCTION CALL?121 ; POINTS TO REMEMBER WHILE CALLING A FUNCTION?121 ; 4.6 RETURN STATEMENT?122 ; USING VARIABLE NUMBER OF ARGUMENTS?123 ; 4.7 PASSING PARAMETERS TO THE FUNCTION?123 ; CALL BY VALUE?123 ; CALL BY REFERENCE?125 ; 4.8 SCOPE OF VARIABLES?128 ; BLOCK SCOPE?129 ; FUNCTION SCOPE?129 ; PROGRAM SCOPE?130 ; FILE SCOPE?130 ; 4.9 STORAGE CLASSES?131 ; THE AUTO STORAGE CLASS?131 ; THE REGISTER STORAGE CLASS?131 ; THE EXTERN STORAGE CLASS?132 ; THE STATIC STORAGE CLASS?133 ; COMPARISON OF STORAGE CLASSES?134 ; 4.10 RECURSIVE FUNCTIONS?134 ; GREATEST COMMON DIVISOR?135 ; FINDING EXPONENTS?136 ; THE FIBONACCI SERIES?136 ; 4.11 TYPES OF RECURSION?137 ; DIRECT RECURSION?137 ; INDIRECT RECURSION?137 ; TAIL RECURSION?138 ; LINEAR AND TREE RECURSION?138 ; 4.12 TOWER OF HANOI?138 ; 4.13 RECURSION VERSUS ITERATION?141 ; ANNEXURE 2?148 ; 5.ARRAYS 149 ; 5.1 INTRODUCTION?149 ; 5.2 DECLARATION OF ARRAYS?150 ; 5.3 ACCESSING ELEMENTS OF THE ARRAY?151 ; CALCULATING THE ADDRESS OF ARRAY ELEMENTS?152 ; 5.4 STORING VALUES IN ARRAYS?153 ; INITIALIZATION OF ARRAYS?153 ; INPUTTING VALUES?154 ; ASSIGNING VALUES?154 ; 5.5 CALCULATING THE LENGTH OF THE ARRAY 154 ; 5.6 OPERATIONS THAT CAN BE PERFORMED ON ARRAYS?155 ; TRAVERSAL?155 ; INSERTION?161 ; DELETION?163 ; MERGING?166 ; SEARCHING THE ARRAY ELEMENTS?168 ; 5.7 ONE-DIMENSIONAL ARRAYS FOR INTER-FUNCTION COMMUNICATION?171 ; 5.8 TWO-DIMENSIONAL ARRAYS?175 ; DECLARATION OF TWO-DIMENSIONAL ARRAYS?176 ; INITIALIZATION OF TWO-DIMENSIONAL ARRAYS?177 ; ACCESSING THE ELEMENTS?178 ; 5.9 OPERATIONS ON TWO-DIMENSIONAL (2D) ARRAYS?181 ; 5.10 TWO-DIMENSIONAL ARRAYS FOR INTER-FUNCTION COMMUNICATION?184 ; PASSING A ROW?185 ; PASSING AN ENTIRE 2D ARRAY?185 ; 5.11 MULTIDIMENSIONAL ARRAYS?187 ; 5.12 SPARSE MATRICES?188 ; ANNEXURE 3?196 ; CASE STUDY FOR CHAPTERS 4 AND 5?208 ; 6. STRINGS 219 ; 6.1 INTRODUCTION?219 ; READING STRINGS?221 ; WRITING STRINGS?222 ; SUMMARY OF FUNCTIONS USED TO READ AND WRITE CHARACTERS?222 ; 6.2 SUPPRESSING INPUT?224 ; USING A SCANSET?224 ; 6.3 STRING TAXONOMY?226 ; 6.4 STRING OPERATIONS?226 ; LENGTH?227 ; CONVERTING CHARACTERS OF A STRING INTO UPPER CASE?227 ; CONVERTING CHARACTERS OF A STRING INTO LOWER CASE?228 ; CONCATENATING TWO STRINGS TO FORM A NEW STRING?229 ; APPENDING?230 ; COMPARING TWO STRINGS?230 ; REVERSING A STRING?231 ; EXTRACTING A SUBSTRING FROM LEFT?232 ; EXTRACTING A SUBSTRING FROM RIGHT OF THE STRING?233 ; EXTRACTING A SUBSTRING FROM THE MIDDLE OF A STRING?233 ; INSERTION?234 ; INDEXING?235 ; DELETION?235 ; REPLACEMENT?236 ; 6.5 MISCELLANEOUS STRING AND CHARACTER FUNCTIONS?237 ; CHARACTER MANIPULATION FUNCTIONS?237 ; STRING MANIPULATION FUNCTIONS?238 ; 6.6 ARRAY OF STRINGS?243 ; 7. POINTERS 257 ; 7.1 UNDERSTANDING THE COMPUTER'S MEMORY?257 ; 7.2 INTRODUCTION TO POINTERS?258 ; 7.3 DECLARING POINTER VARIABLES?259 ; 7.4 POINTER EXPRESSIONS AND POINTER ARITHMETIC ?262 ; 7.5 NULL POINTERS?266 ; 7.6 GENERIC POINTERS?267 ; 7.7 PASSING ARGUMENTS TO FUNCTION USING POINTERS?267 ; 7.8 POINTERS AND ARRAYS?269 ; 7.9 PASSING AN ARRAY TO A FUNCTION?272 ; 7.10 DIFFERENCE BETWEEN ARRAY NAME AND POINTER?273 ; 7.11 POINTERS AND STRINGS?274 ; 7.12 ARRAY OF POINTERS?278 ; 7.13 POINTERS AND 2-D ARRAYS?280 ; 7.14 POINTERS AND 3-D ARRAY?282 ; 7.15 FUNCTION POINTERS?283 ; INITIALIZING A FUNCTION POINTER?283 ; CALLING A FUNCTION USING A FUNCTION POINTER?284 ; COMPARING FUNCTION POINTERS?284 ; PASSING A FUNCTION POINTER AS AN ARGUMENT TO A FUNCTION?284 ; 7.16 ARRAY OF FUNCTION POINTERS?285 ; 7.17 POINTERS TO POINTERS?286 ; 7.18 MEMORY ALLOCATION IN C PROGRAMS?286 ; 7.19 MEMORY USAGE?287 ; 7.20 DYNAMIC MEMORY ALLOCATION?287 ; MEMORY ALLOCATIONS PROCESS?287 ; ALLOCATING A BLOCK OF MEMORY?288 ; RELEASING THE USED SPACE?289 ; TO ALTER THE SIZE OF ALLOCATED MEMORY?289 ; 7.21 DRAWBACK OF POINTERS?291 ; ANNEXURE 4?300 ; CASE STUDY FOR CHAPTERS 6 AND 7?303 ; 8. STRUCTURE, UNION, AND ENUMERATED DATA TYPES 308 ; 8.1 INTRODUCTION?308 ; STRUCTURE DECLARATION?308 ; TYPEDEF DECLARATIONS?310 ; INITIALIZATION OF STRUCTURES?310 ; ACCESSING THE MEMBERS OF A STRUCTURE?311 ; COPYING AND COMPARING STRUCTURES?312 ; 8.2 NESTED STRUCTURES?314 ; 8.3 ARRAYS OF STRUCTURES?315 ; 8.4 STRUCTURES AND FUNCTIONS?318 ; PASSING INDIVIDUAL MEMBERS?318 ; PASSING THE ENTIRE STRUCTURE?318 ; PASSING STRUCTURES THROUGH POINTERS?322 ; 8.5 SELF-REFERENTIAL STRUCTURES?327 ; 8.6 UNION?327 ; DECLARING A UNION?327 ; ACCESSING A MEMBER OF A UNION?327 ; INITIALIZING UNIONS ?328 ; 8.7 ARRAYS OF UNION VARIABLES?328 ; 8.8 UNIONS INSIDE STRUCTURES?329 ; 8.9 ENUMERATED DATA TYPES?330 ; ENUM VARIABLES?331 ; USING THE TYPEDEF KEYWORD?331 ; ASSIGNING VALUES TO ENUMERATED VARIABLES?331 ; ENUMERATION TYPE CONVERSION?331 ; COMPARING ENUMERATED TYPES?332 ; INPUT/OUTPUT OPERATIONS ON ENUMERATED TYPES?332 ; ANNEXURE 5?339 ; 9. FILES 341 ; 9.1 INTRODUCTION TO FILES?341 ; STREAMS IN C?341 ; BUFFER ASSOCIATED WITH FILE STREAM?342 ; TYPES OF FILES?342 ; 9.2 USING FILES IN C?343 ; DECLARING A FILE POINTER VARIABLE?343 ; OPENING A FILE?344 ; CLOSING A FILE USING FCLOSE ()?345 ; 9.3 READ DATA FROM FILES?345 ; FSCANF ()?346 ; FGETS ()?347 ; FGETC ()?347 ; FREAD ()?348 ; 9.4 WRITING DATA TO FILES?349 ; FPRINTF ()?349 ; FPUTS ()?350 ; FPUTC ()?351 ; FWRITE ()?351 ; 9.5 DETECTING THE END-OF-FILE?352 ; 9.6 ERROR HANDLING DURING FILE OPERATIONS?353 ; CLEARERR()?353 ; PERROR ()?354 ; 9.7 ACCEPTING COMMAND LINE ARGUMENTS?354 ; 9.8 FUNCTIONS FOR SELECTING A RECORD RANDOMLY?368 ; FSEEK ()?368 ; FTELL ()?371 ; REWIND ()?371 ; FGETPOS ()?372 ; FSETPOS ()?372 ; 9.9 REMOVE ()?373 ; 9.10 RENAMING THE FILE?373 ; 9.11 CREATING A TEMPORARY FILE?373 ; 10. PREPROCESSOR DIRECTIVES 379 ; 10.1 INTRODUCTION?379 ; 10.2 TYPES OF PREPROCESSOR DIRECTIVES?380 ; 10.3 #DEFINE?380 ; OBJECT-LIKE MACRO?380 ; FUNCTION-LIKE MACROS?381 ; NESTING OF MACROS?382 ; RULES FOR USING MACROS?382 ; OPERATORS RELATED TO MACROS?383 ; 10.4 #INCLUDE?383 ; 10.5 #UNDEF?384 ; 10.6 #LINE?385 ; 10.7 PRAGMA DIRECTIVES?385 ; 10.8 CONDITIONAL DIRECTIVES?387 ; #IFDEF?388 ; #IFNDEF?388 ; THE #IF DIRECTIVE?388 ; THE #ELSE DIRECTIVE?389 ; THE #ELIF DIRECTIVE?389 ; THE #ENDIF DIRECTIVE?390 ; THE DEFINED OPERATOR?390 ; 10.10 #ERROR DIRECTIVE?390 ; 10.11 PREDEFINED MACRO NAMES?391 ; ANNEXURE 6?395 ; 11. LINKED LISTS 400 ; 11.1 INTRODUCTION?400 ; 11.2 LINKED LISTS VERSUS ARRAYS?402 ; 11.3 MEMORY ALLOCATION AND DEALLOCATION FOR A LINKED LIST?402 ; 11.4 DIFFERENT TYPES OF LINKED LISTS?404 ; 11.5 SINGLY LINKED LIST?404 ; TRAVERSING A SINGLY LINKED LIST?404 ; SEARCHING A LINKED LIST?405 ; INSERTING A NEW NODE IN A LINKED LIST?406 ; 11.6 CIRCULAR LINKED LIST?417 ; 11.7 DOUBLY LINKED LIST?418 ; 11.8 CIRCULAR DOUBLY LINKED LIST?419 ; 11.9 HEADER LINKED LIST?420 ; CASE STUDY FOR CHAPTERS 8, 9, AND 11?426 ; INDEX 432

About the Author :
Reema Thareja is Assistant Professor at Department of Computer Science, Shyama Prasad Mukherjee College for Women, University of Delhi. She has completed MCA (Software Engineering) and MPhil (Computer Science). She specializes in programming languages, OS, microprocessors, DBMS, multimedia, and web technologies and is currently pursuing research in the area of improving data warehouse quality.


Best Sellers


Product Details
  • ISBN-13: 9780198086390
  • Publisher: OUP India
  • Publisher Imprint: OUP India
  • Height: 279 mm
  • Spine Width: 18 mm
  • Width: 215 mm
  • ISBN-10: 0198086393
  • Publisher Date: 31 Jan 2013
  • Binding: Paperback
  • Language: English
  • Weight: 858 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Introduction to C Programming
OUP India -
Introduction to C Programming
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Introduction to C Programming

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!