The c programming is really not a good book in the baby in the baby

I continue to read this. "C Programming》,It isHemopurificationThat this,Third Edition。I bought it was genuine,Really I do not know why so many people recommend this book online,day!

About thatvoid main () error shakingI do not do more than Tucao,,,

Saying today do exercises,Decisively I found a mistake。

In book 89,Exercise Exercise 4.5, his title was an example of this is the:

  1. #include<stdio.h>
  2. int main(void)
  3. {
  4. int a = 5,b = 7;
  5. float x = 67.8564,y = -789.124;
  6. char c = ‘A’;
  7. long n = 1234567;
  8. unsigned u = 65535;
  9. printf(“%d% d n”,a,b);
  10. printf(“%3d=n”,a,b);
  11. printf(“%f,%f n”,x,Y);
  12. printf(“%-10f,%-10f n”,x,Y);
  13. printf(“%8.2f,%8.2f,%.4f,%.4f,%3f,%3f n”,x,Y,x,Y,x,Y);
  14. printf(“%e,%10.2s n”,x,Y);
  15. printf(“%c,%d,%O,%x n”,c,c,c,c);
  16. printf(“%ld,%the,%x n”,n,n,n);
  17. printf(“%in,%O,%x,%d n”,in,in,in,in);
  18. printf(“%s,%5.3sn”,”COMPUTER”,”COMPUTER”);
  19. return 0;
  20. }
Look out? Look out?
of course not。
I know huh,You may buy this book very few people see it - but will rarely exercises like me really hit up the computer to compile ⋯⋯
More people might use tc,,,But I think even tc,You will prompt it!
We note that the line ~ 16

printf(“%ld,%the,%x n”,n,n,n);

See it to see it! Hmmm ⋯⋯ declaration sectionn Obviouslylongtype,Back to the outputxTherelGone! Then brush it did not! ! !

= = I say how gcc% x I suggested desperately wrong with it ⋯⋯

And initially I thought he was wrong ⋯⋯

How it can be! For those who only cheese on paper exercises c language,How deep hurt ah ~

This concludes Tucao ah ⋯⋯。

Other,you canResults on the paper to write a program compiled to runWhat?

I'm the first to write recompiled control Oh ~ ~ the result is all right! Ah ha ha

Original article written by Gerber drop-off:R0uter's Blog » The c programming is really not a good book in the baby in the baby

Reproduced Please keep the source and description link:https://www.logcg.com/archives/124.html

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a Reply

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