Buy Ebook Computer Programming - Ebook PDF Cheap Price
Buy Ebook Computer Programming - Ebook PDF Cheap Price
com
https://ebooksecure.com/download/computer-
programming-ebook-pdf/
https://ebooksecure.com/product/python-programming-an-introduction-to-
computer-science-3rd-edition-by-john-zelle-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-programming-language-
pragmatics-4th-edition/
ebooksecure.com
https://ebooksecure.com/download/programming-in-c-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/product/mathematics-for-elementary-teachers-
with-activities-5th-edition-ebook-pdf/
ebooksecure.com
(eBook PDF) Art History 6th Edition by Marilyn Stokstad
https://ebooksecure.com/product/ebook-pdf-art-history-6th-edition-by-
marilyn-stokstad/
ebooksecure.com
https://ebooksecure.com/product/original-pdf-asking-the-right-
questions-a-guide-to-critical-thinking-12th/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-paralegal-today-the-legal-
team-at-work-6th-edition/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-managing-organizational-
behaviour-in-canada-2nd/
ebooksecure.com
https://ebooksecure.com/product/25-essential-skills-and-strategies-
for-the-professional-behavior-analyst-pdf-version/
ebooksecure.com
(eBook PDF) Auditing A Practical Approach, Extended
Canadian Edition
https://ebooksecure.com/product/ebook-pdf-auditing-a-practical-
approach-extended-canadian-edition/
ebooksecure.com
As per
JNTU-Kakinada
Syllabus Regulation
2016
Computer
Programming
About the Author
E Balagurusamy, former Vice Chancellor, Anna University, Chennai and Member, Union Public Service
Commission, New Delhi, is currently the Chairman of EBG Foundation, Coimbatore. He is a teacher, trainer,
and consultant in the fields of Information Technology and Management. He holds an ME (Hons) in Electrical
Engineering and PhD in Systems Engineering from the Indian Institute of Technology (IIT) Roorkee. His
areas of interest include Object-Oriented Software Engineering, E-Governance: Technology Management,
Business Process Re-engineering, and Total Quality Management.
A prolific writer, he has authored a large number of research papers and several books. His best-selling
books, among others include:
∑ Programming in ANSI C, 7/e
∑ Fundamentals of Computers
∑ Computing Fundamentals and C Programming
∑ Programming in Java, 5/e
∑ Programming in BASIC, 3/e
∑ Programming in C#, 3/e
∑ Numerical Methods
∑ Reliability Engineering
∑ Introduction to Computing and Problem Solving using Python, 1e
A recipient of numerous honors and awards, E Balagurusamy has been listed in the Directory of Who's
Who of Intellectuals and in the Directory of Distinguished Leaders in Education.
As per
JNTU-Kakinada
Syllabus Regulation
2016
Computer
Programming
E Balagurusamy
Chairman
EBG Foundation
Coimbatore
Computer Programming
Copyright © 2017 by McGraw Hill Education (India) Private Limited.
No part of this publication may be reproduced or distributed in any form or by any means, electronic, mechanical, photocopying,
recording, or otherwise or stored in a database or retrieval system without the prior written permission of the publishers.
The program listings (if any) may be entered, stored and executed in a computer system, but they may not be reproduced for
publication.
This edition can be exported from India only by the publishers,
McGraw Hill Education (India) Private Limited
Print Edition:
ISBN-13: 978-93-5260-388-6
ISBN-10: 93-5260-388-5
Information contained in this work has been obtained by McGraw Hill Education (India), from sources believed to be reliable.
However, neither McGraw Hill Education (India) nor its authors guarantee the accuracy or completeness of any information
published herein, and neither McGraw Hill Education (India) nor its authors shall be responsible for any errors, omissions,
or damages arising out of use of this information. This work is published with the understanding that McGraw Hill Education
(India) and its authors are supplying information but are not attempting to render engineering or other professional services.
If such services are required, the assistance of an appropriate professional should be sought.
Typeset at The Composers, 260, C.A. Apt., Paschim Vihar, New Delhi 110 063 and printed at
Cover Printer:
Preface xiii
Roadmap to the Syllabus xvi
Answers 1.29
Review Questions 1.29
Answers 4.48
Review Questions 4.49
Debugging Exercises 4.51
Programming Exercises 4.51
Answers 7.40
Review Questions 7.40
Debugging Exercises 7.42
Programming Exercise 7.42
INTRODUCTION
Computers plays an increasing important role in today’s world and a sound knowledge of computers has
become indispensable for anyone who seeks employment not only in the area of IT but also in any other
field as well. Computer programming is dedicated to the understanding of computer language, and writing
and testing of programs that computers’ follow to perform their functions. The programs are created using
programming languages and C is the most prevalent, efficient and compact programming language. C
combines the features of a high-level language with the elements of the assembler and is thus close to both
man and machine. The growth of C during the last few years has been phenomenal. It has emerged as the
language of choice for most applications due to its speed, portability and compactness of code. Thus, many
institutions and universities in India have introduced a subject covering Computer Programming.
This book is specially designed for first-year students of Jawaharlal Nehru Technological University
Kakinada (JNTU K) and would enable them to master the necessary skills for programming with C language.
The text has been infused with numerous examples and case studies to empower the learner. Furthermore, the
book also covers design and implementation aspect of data structures using standard ANSI C programming
language.
SIGNIFICANT FEATURES
∑ New! Completely in sync with the syllabus of JNTU Kakinada (2016 Regulation)
∑ New! Incorporates all the features of ANSI C that are essential for a C programmer.
∑ New! Solutions to latest 2015 (Nov/Dec) and 2016 (May) JNTU Kakinada question paper is placed
at the end of the book (All 4 sets)
∑ New! 149 Multiple Choice Questions incorporated at the end of each chapters help students tests
their conceptual understanding of the subject
∑ 22 Case Studies in relevant chapters with stepwise solution to demonstrate real-life applications
∑ New! Updated information on C99/C11 features
∑ New! Topics like ANSI C library functions, Negation, Swapping Values, Recursion v/s Iteration are
covered in detail
∑ Learning by example approach ensures smooth and successful transition from a learner to a skilled
C programmer
∑ Enhanced student-friendly chapter design including Outline, Introduction, Section-end Solved
Programs, Case Studies, Key Terms, Just Remember, Multiple Choice Questions, Review Questions,
Debugging Exercises, Programming Exercises
∑ Special box feature highlighting supplementary information that complements the text.
xiv Preface
PEDAGOGICAL FEATURES
∑ 134 Solved C Programs demonstrate the general principles of good programming style
∑ 171 Review Questions helps in testing conceptual understanding
∑ 28 Debugging Exercise helps in participating coding contests
∑ 179 Programming Exercises simulate interest to practice programming applications
CHAPTER ORGANIZATION
The content is spread across 9 chapters. Chapter 1 introduces computer systems, programming languages
and environment, software development method, and algorithms. Chapter 2 gives an overview of C and
explaining the keywords, identifiers, constants, variables, data types and various case studies on these.
Chapters 3 comprises of decision-making, branching and looping methods. Chapter 4 covers the functions
which are used in C language. Chapter 5 focuses on arrays while Chapter 6 deals with strings. Different
types of pointers and its types are discussed in Chapter 7. Chapter 8 presents structures and unions while
Chapter 9 covers file types and their management. Appendix 1 covers C99/C11 features in detail. In addition
to all this, Solved Question Papers of Nov/Dec 2015 (4 sets) and May 2016 (4 sets) are also given in this
book.
CD RESOURCES
The supplementary CD provided along with the book would help the students master programming language
and write their own programs using Computer programming concepts and data structures. The CD comprises
of the following resources:
∑ New! 2012, 2013, 2014, Jan/Feb 2015 solved question papers
∑ New! Lab Programs as per the new syllabus
∑ Two major programming projects—Inventory and Record Entry & two mini projects—Linked List
and Matrix Multiplication
∑ 100 Programming Exercises and 200 Objective Type Questions aligned as per the new syllabus
∑ 5 Solved Model Question Papers
∑ 79 Additional Solved Programs
∑ Additional content on Matrix Operation
ACKNOWLEDGEMENTS
A number of reviewers took pains to provide valuable feedback for the book. We are grateful to all of them
and their names are mentioned as follows:
S. Krishna Rao Sir CR Reddy College of Engineering, Eluru, Andhra Pradesh
Narasimha Rao Kandula Vishnu Institute of Technology, Bhimavaram, Andhra Pradesh
K. Phani Babu, Chundru Raja Ramesh Sri Vasavi Engineering College, Tadepalligudem, Andhra
Pradesh
Preface xv
E Balagurusamy
Publisher’s Note
McGraw Hill Education (India) invites suggestions and comments, all of which can be sent to
[email protected] (kindly mention the title and author name in the subject line).
Piracy-related issues may also be reported.
Exploring the Variety of Random
Documents with Different Content
Yours, &c. in Him,
G. W.
LETTER MCCLXXXV.
To Mr. K――n.
LETTER MCCLXXXVI.
To the Reverend Mr. T――.
My dear Friend,
A THOUSAND thanks for your kind letters. Jesus is kind. I am better, and
just going on board the Fanny, bound to Rapanach, in Virginia. Yours
to good Lady H――n is taken care of. I hear her daughter died well, and
that her Ladyship is comforted and resigned. Blessed be God! Adieu.
Follow me with your prayers, as being
G. W.
LETTER MCCLXXXVII.
To the Reverend Mr. G――.
S TRANGE! that I should not see one whom I so dearly love. Dear Mr.
S―― will tell you the reasons. I expect to be called every moment.
God bless and reward you and yours. The diploma was sent to Edinburgh
to be signed by Mr. Trail, but hath miscarried. I wrote to Mr. Hamilton to
send it by the Diligence, which is to sail in about six weeks to Boston.
Expecting to be called every moment, I can only hasten to subscribe
myself, reverend and very dear Sir,
LETTER MCCLXXXVIII.
To Mr. S―― S――.
I HOPE that this will find you and yours prospering both in soul and body. It
leaves me looking towards Virginia but only as an harbour in my way to
an infinitely better port, from whence I shall never put out to sea again.
Through mercy I have been surprizingly kept up during the voyage, long
but not tedious. Jesus hath made the ship a Bethel, and I enjoyed that
quietness which I have in vain sought after for some years on shore. Not an
oath to be heard even in the greatest hurry. All hath been harmony and
love. But my breath is short, and I have little hopes, since my late relapse,
of much further public usefulness. A few exertions, like the last struggles of
a dying man, or glimmering flashes of a taper just burning out, is all that
can be expected from me. But blessed be God, the taper will be lighted up
again in heaven. The sun, when setting here, only sets to rise in another
clime. Such is the death of all God’s saints. Why then should we be afraid?
Why should we not rather by faith be looking through the windows of
mortality, and daily crying, “Why are his chariot wheels so long in coming?”
We had need of patience, especially when the evil days of sickness and
declining age come. But we serve a Master who will not forsake his
servants when grey headed. When heart and flesh fail, God, even our God
in Christ, will be our portion and confidence for ever. Does my dear Mr.
S―― repent that he served and worked for Him when young? Is dear Mrs.
S―― sorrowful that he was the God of her youth? Or is Miss now thinking
that she hath lately made a wrong choice? No, no: I will venture to answer
for them all. Let us, therefore, love our Master, and not go from him. Who
knows but our latter end may yet increase? If not in public usefulness,
Lord Jesus, let it be in inward heart-holiness, that we may daily ripen for
the full enjoyment of thyself in heaven! I know who says, Amen; I add
Amen, and Amen! and so subscribe myself, with ten thousand thanks for all
favours, my dear friends,
Yours, &c. &c. in our Jesus,
G. W.
August 24.
G. W.
LETTER MCCXC.
To all my dear Tabernacle Hearers, that love the Lord
Jesus Christ in Sincerity.
You will not forget to persevere in praying for a poor, worthless, but
willing pilgrim, who dearly loves you, and daily rejoices in the
pleasing reflection, that he shall ere long meet you in a better world,
where the inhabitants shall no more say, “I am sick.” Blessed
prospect! Surely on the very mentioning it, you will break forth in
singing,
I will not interrupt you. Adieu. The Lord Jesus be with your
spirits. Only when you have done singing, my dear fellow-labourers,
my dear Tabernacle-hearers, forget not to subjoin at least one
petition, that whether absent or present, Jesus may be more and
more precious to,
G. W.
LETTER MCCXCI.
To all my dear Tottenham-Court Hearers, that love the Lord
Jesus Christ in Sincerity.
T HOUGH less than the least of all, and unworthy, utterly unworthy
the notice of any, yet I cannot help thinking, but for Christ’s
sake you will be glad to hear of the goodness of the Lord extended
towards me since my departure from London. Surely it was trying, to
leave so many at each end of the town, who, I hope, will be my joy
and crown of rejoicing in the great day. Indeed, after being taken ill of
my old disorder at Edinburgh, and remaining near six weeks silent in
Scotland, I thought of seeing you soon again: but having obtained
help, I embarked, for the eleventh time, in the ship Fanny; and
though we have had a long and trying, yet, blessed be God, it hath
not been an unprofitable voyage. Often, often have I thought of my
dear London friends, when I guessed they were assembled together;
and as often prayed, when I knew they were retired to rest, that he
that keepeth Israel, and neither slumbereth nor sleepeth, would
watch over them, and make their very dreams devout. How I am to
be disposed of when on dry land, is best known to Him whose I am,
and whom I desire to serve in preaching the gospel of his dear Son.
Had I strength equal to my will, I could fly from pole to pole. Though
wearied, and now almost worn out, indeed and indeed I am not
weary of my blessed Master’s service. O love him, love him, for he is
a good Master, and doth not leave us when our strength faileth.
Make him your portion, and he will be your confidence for ever.
According to my present views, if able to do any thing for you,
through his leave I hope to see you again next year. In the mean
while, as long as I have breath to draw, it shall be my heart’s desire
and prayer to God, that the labours of the dear servants of Jesus,
who are called to preach amongst you, may be so blessed and
owned from above, that I may not be missed a single moment. May
they, may you increase with all the increase, till you are all filled with
all the fulness of God. When near his throne, if there be any
consolation in Christ, if any comfort of love, if any fellowship of the
Spirit, if any bowels of mercies, pray that the same blessing may be
conferred, my dear fellow-labourers, my dear Tottenham-Court
hearers, on
Your most affectionate friend, and ready servant for
Christ’s sake,
G. W.
LETTER MCCXCII.
To Mr. A――.
M ANY more letters did I intend to write to you and other dear
friends, had I not been prevented by storms, &c. for some
weeks before our arrival. If enabled, I shall take care to pay them as
I move from place to place. We are now on dry land. Christian
friends, whom I never before heard of, were prepared to receive me:
and I have preached four times. This leaves me in my way to
Philadelphia, still visited with my old disorder, which I now never
expect to drop, till I drop for good and all this body of clay, this body
of sin and death. I suppose you are in like circumstances, as well as
thousands besides, who love the Lord Jesus in sincerity. Well: He
that cometh will come, and will not tarry. Blessed are all they that
wait for him. I hope you are favoured with precious gales of divine
influence. Tender love to all our dear fellow-labourers, and to all our
dear hearers of every denomination, in every place. You will not
forget a poor pilgrim, who, though absent in body is present in spirit.
Hoping to write in a few days to dear Mr. Middleton, &c. and wishing
you and yours all that a blessed never-failing God can give you in
time and eternity, I subscribe myself, my very dear old friend,
G. W.
LETTER MCCXCIII.
To Mr. W――y.
Poor Wright is taking his American seasoning. He hath the ague and
fever. This prevents his writing. Inform his relations of it. He wants for
nothing. When you write, mention nothing but what relates to the
eternal world. I have no thoughts to throw away on the trifling things
of time. Tender love to all that are travelling to the New-Jerusalem.
There, if no sooner, we shall meet and praise the never-failing
Emmanuel, for whose great name’s sake I subscribe myself,
Yours, &c.
G. W.
LETTER MCCXCIV.
To Mr. R―― K――n.
G. W.
LETTER MCCXCV.
To Mr. D――, &c.
G. W.
LETTER MCCXCVI.
To Mr. R―― K――n.
G. W.
LETTER MCCXCVII.
To Mr. D――n, &c.
G. W.
LETTER MCCXCVIII.
New-York, December 1, 1763.
My dear Sir,
G. W.
New-York, December 4.
G. W.
LETTER MCCXCIX.
To Mr. D――n, &c.
G. W.
LETTER MCCC.
To Mr. H――y.
Dear Sir,
G. W.
LETTER MCCCI.
To Mr. S―― S――.
I SEE by what you have done lately for the tabernacle, that you do
not forget absent friends. I think you and yours are not forgotten
by them, neither I believe are forgotten by the Friend of all. He
remembers us, though he is advanced to so great a kingdom;
remembers us in our low estate, and remembers that we are but
dust. What a blessing this to worthless, ill and hell-deserving me!
What a mercy, to meet with such a friend in the latter stages of our
road! Surely he is altogether lovely. Having loved his own, he loves
them to the end; witness his yet continuing to own the feeble labours
of an almost worn out pilgrim. Every day the thirst for hearing the
word increases, and the better sort come home to hear more of it. I
must now go soon to New-England. Cold weather and a warm heart
suit my tottering tabernacle best. The ship is going. God bless you
and yours! I hope that all related, and all who are near and dear to
you, are alive for God,—a God,—a God in Christ; in whose great
name, I beg leave to subscribe myself, my very dear friend,
G. W.
LETTER MCCCII.
To the Reverend Mr. G――.
G. W.
LETTER MCCCIII.
To Mr. D――n, &c.
G. W.
LETTER MCCCIV.
To Mr. R―― K――n.
G. W.