• Verkeerd document? Gratis ruilen
  • Geschreven door studenten die geslaagd zijn
  • Direct beschikbaar na je betaling
  • Online lezen of als PDF
Verkopen
Kies je studieland
Kies je taal
Document preview thumbnail
Voorbeeld 4 van de 574 pagina's
Overig

Programming in C, 2nd Edition by P. Dey – Study Guide and Programming Practice

Document preview thumbnail
Voorbeeld 4 van de 574 pagina's

This study resource supports learning and revision based on Programming in C, 2nd Edition by P. Dey. It is intended to help students review C programming fundamentals, understand core programming concepts, and practise applying them through coding exercises and problem-solving activities. Specific topics and exercises depend on the contents of the document.

Voorbeeld van de inhoud

Programming in


C
Second Edition




Pradip Dey Manas Ghosh




OXFORD
UNIVERSITY PRESS

,© Oxford University Press 2011


ISBN: 978-0-198065-28-9

, C Preface to the
First Edition



Since the evolution of computers, a variety of program- CONTENT AND STRUCTURE
ming languages have come into existence. C stands
Chapter 1 begins by explaining the concept of program-
out among general-purpose programming languages
ming. It discusses the techniques of forming an organized
for its unrivaled mix of portability, flexibility, and ef-
approach to problem solving. It also identifies the differ-
ficiency. It is a versatile language and is commonly used
ent types of programs and the various categories of pro-
for developing application and system programs. C has
gramming languages available. The prescribed tools that
block structures, stand-alone functions, a compact set of
are used in this process are described and explained with
keywords, and very few restrictions. For all these rea-
sufficient examples and diagrams.
sons, learning and using C is a necessity for most pro-
For a beginner, Chapter 2 is undoubtedly the most im-
grammers.
portant chapter that describes the basic elements of C. This
chapter introduces the keywords, the basic data types and
ABOUT THE BOOK their modifiers, operators and their precedence, and ex-
This book is intended for an introductory course on pro- pressions and data type conversion rules. The basic struc-
gramming in C. It assumes no prior programming expe- ture of a C program along with the common commands
rience in C or any other language. Readers will find the used in MS-DOS and UNIX/Linux for compiling and running
explanations lucid and effective. Every feature of C has it has been described at length in this chapter.
been demonstrated with appropriate programs tested and Accepting data from and conveying the results to a user
run on a computer. The output obtained after executing is one of the most important actions desired from a pro-
these programs have also been included. The explana- gram. To satisfy these requirements through the console,
tions have been depicted with suitable diagrams to convey there are some commonly used input and output func-
the concepts more effectively. Readers will be proficient tions in C. These have been explained with illustrations in
at programming after solving the review questions and Chapter 3.
programming exercises given at the end of each chapter. Program flow control and looping constructs in C are ex-
Though every attempt has been made to avoid and check plained in Chapter 4. The general statement format with flow-
errors, we will be grateful to readers if they can bring charts and examples illustrate their significance in programs.
to our notice any errors that may have crept in inadver- Arrays and strings are two important data structures for
tently. handling a cluster of homogeneous data. How such clus-

, vi Preface to the First Edition

ters are declared and handled is explained with ample ex- The appendices contain case studies where the problem
amples in Chapter 5. is first defined and then the algorithm is developed, based
The concept of functions, its form, and its requirement on which the C program is coded. Some sample runs ob-
in a program is discussed in Chapter 6 with well-explained tained during the execution of these programs have also
examples. Recursive functions are also described with been included. It also contains tables for ASCII codes, num-
several examples. Analysis of time and space complexity ber system conversions, escape sequences, operators, data
for an algorithm has also been presented in this chapter. types and data conversion rules, commonly used conver-
One of the most important features of C is pointers. sion characters, and format tags. Among many other useful
Starting with an introduction to pointers, Chapter 7 also topics covered in the appendices, an exhaustive listing of
elaborates on how pointers are used with arrays, strings, C library functions, with programs illustrating how these
and functions. The use of pointers is also described in functions can be put to use, have also been presented.
depth with innumerable examples.
User-defined data types such as structures and unions ACKNOWLEDGEMENTS
are described in Chapter 8. What these data types com-
prise and how these are handled and used are illustrated We thank our students Rakesh Dutta and Niloy Debnath
with examples. for verifying the programs in this book and Sonia Khed-
Creating, amending, appending, and many other opera- wal, Priyanka Nawalkar, Sayantani Saha, and Debolina
tions on files in C is a necessity for storing and retrieving Sharangi for their assistance in the preparation of the
data and programs. This has been covered in Chapter 9 model questions. We are grateful to the staff of Oxford
with sufficient examples. University Press for their continuous cooperation, interest,
Linked list, which is a popular data structure, has been and assistance extended to us during the preparation of the
covered in Chapter 10. Various types of linked lists and the book. We are also thankful to our colleague Mr Manash
different operations that can be carried out on such linked Sinharoy for helping us in preparing the manuscript in
lists have been discussed. In this chapter, readers will also time and Mr Tapas Kumar Tunga and Mr P.N. Pathak for
get to know how pointers are used in constructing this data their assistance in the preparation of the manuscript.
structure. Special thanks are due to Mr Steve Summit for his ar-
Chapter 11 highlights some of the advanced features ticles on C, which have guided us in preparing some of the
of C such as command-line arguments, bit-wise operators, topics in this book. We also wish to thank Mr Vijay Kumar
different memory models, and type qualifiers with several R Zanvar and Mr Jayasima Ananth for the article on point-
illustrations. ers and arrays as also Mr Thomas Jenkins for the article on
Frequently asked questions are always a source of recursion, both of which have served as a guide during the
learning. Some frequently asked questions have been in- development of this manuscript. We express our gratitude
cluded at end of the book, which will help readers to clear to Mr Peter Burden, Mr Mike Banahan, Mr Declan Brady,
any doubts pertaining to programming in C. and Mr Mark Doran for their articles on C.
PRADIP DEY
MANAS GHOSH

Documentinformatie

Geüpload op
29 mei 2025
Aantal pagina's
574
Geschreven in
2024/2025
Type
Overig
Persoon
Onbekend
€10,42

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
TopGradeSolutions
4,9
(175)
Verkocht
124
Volgers
10
Items
13736
Laatst verkocht
1 week geleden

Echte notities, van echte studenten
Elk document op Stuvia is geschreven door een medestudent die hetzelfde vak deed. Zo leer je van iemand die het al heeft gehaald.



Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen