Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. Keywords in C
  2.  
  3. auto
  4. break
  5. case
  6. char
  7. const
  8. continue
  9. default
  10. do
  11.  
  12. double
  13. else
  14. enum
  15. extern
  16. float
  17. for
  18. goto
  19. if
  20.  
  21. int
  22. long
  23. register
  24. return
  25. short
  26. signed
  27. sizeof
  28. static
  29.  
  30. struct
  31. switch
  32. typedef
  33. union
  34. unsigned
  35. void
  36. volatile
  37. while
  38.  
  39. C99 adds five more keywords:
  40.  
  41. _Bool
  42. _Complex
  43. _Imaginary
  44. inline
  45. restrict
  46.  
  47. C11 adds seven more keywords:
  48.  
  49. _Alignas
  50. _Alignof
  51. _Atomic
  52. _Generic
  53. _Noreturn
  54. _Static_assert
  55.  
  56. Placeholders - format specifiers
  57.  
  58. %d - int (same as %i)
  59. %ld - long int (same as %li)
  60. %f - float
  61. %lf - double
  62. %c - char
  63. %s - string
  64. %x - hexadecimal
  65.  
  66. NOTES :
  67.  
  68. %d (print as a decimal integer)
  69. %6d (print as a decimal integer with a width of at least 6 wide)
  70. %f (print as a floating point)
  71. %4f (print as a floating point with a width of at least 4 wide)
  72. %.4f (print as a floating point with a precision of four characters after the decimal point)
  73. %3.2f (print as a floating point at least 3 wide and a precision of 2)
  74.  
  75. %e Display the floating point number using scientific notation with e
  76. %E Like e, but with a capital E in the output
  77. %g Use shorter of the two representations: f or e
  78. %G Like g, except uses the shorter of f or E
  79.  
  80. Escape Sequences :
  81.  
  82.  
  83. \n (newline)
  84. \t (tab)
  85. \v (vertical tab)
  86. \f (new page)
  87. \b (backspace)
  88. \r (carriage return)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement