Loading...
हथेली के 10 निशान, ये हैं भाग्योदय के संकेत
Menu
Loading...

Computer E book of Programing | high level langauges| Ansi C | BAsic Data structure in C

October 20, 2017 - Basic computer language, Computer Books, Ebook

is an ANSWER BOOK. It provides solutions to all the exercises in The
C Programming Language. second edition. by Brian W. Kernighan and Dennis
M. Ritchie (Prentice Hall, 1988)*.
The American National Standards Institute (ANSI) produced the ANSI
standard for C and K&R modified the first edition of The C Programming
Language. We have rewritten the solutions to conform to both the ANSI
standard and the second edition of K&R.
Careful study of The C Answer Book, second edition. used in conjunction
with K&R, will help you understand C and teach you good C programming
skills. Use K&R to learn C, work the exercises, then study the solutions presented
here. We built our solutions using the language constructions known at
the time the exercises appear in K&R. The intent is to follow the pace of K&R.
Later, when you learn more about the C language, you will be able to provide
possibly better solutions. For example. until the statement…

Write a program to copy its input to it> output. replacing each string of unc or
more blanks by a single blank…………….

11nclude /• re plac e string of blanks with a single blank main() int c, last c; lastc • HONBLANK; while ((c = get char()) 1= EOFJ { l f ( C � : I I ) putchar(c); if (c == ‘ ‘) if

 

 

 

How would you test the word count program7 What kinds of input are most
likely to uncover bugs if there are any”
To test the word count program first try no input. The output should be:
0 0 0 (zero newlines. zero words, zero characters).
Then try a one-character word. The output should be: l I 2 (one newline.
one word, two characters-a letter followed by a newline character).
Then try a two-character word. The output should be: I I 3 (one newline.
one word. three characters-two characters followed by a newline character).
In addition, try 2 one-character words (the output should be: I 2 4) and
2 one-character words-one word per line (the output should be 2 2 4).
The kinds of input most likely to uncover bugs are those that test boundary
conditions. Some boundaries are:
-no input
-no words-just newlines
-no words-just blanks. tabs. and newlines…………………Read more……ANSI C Programing

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *