Guest User

Untitled

a guest
Oct 7th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. final int something;
  2.  
  3. if ( today == Friday )
  4. something = 7;
  5. else
  6. something = 42;
  7.  
  8. final int something;
  9.  
  10. if ( today == Friday )
  11. something = 7;
  12.  
  13. if ( today != Friday )
  14. something = 42;
  15.  
  16. const int something = ( today == Friday ) ? 7 : 42;
  17.  
  18. #include<stdio.h>
  19.  
  20. int main ( void )
  21. {
  22. printf ( "wibblen" );
  23.  
  24. {
  25. const int x = 10;
  26.  
  27. printf ( "x = %dn", x );
  28. }
  29.  
  30. return 0;
  31. }
  32.  
  33. const int foo;
  34. foo = 4;
  35.  
  36. int * const foo;
  37. foo = 4;
  38.  
  39. int a, b, c;
  40.  
  41. a = 12;
  42. // do some stuff with a
  43.  
  44. b = 17;
  45. // do some stuff with a and b
  46.  
  47. c = 23;
  48. // do some stuff with a, b, and c
  49.  
  50. int a = 12;
  51. // do some stuff with a
  52. {
  53. int b = 17
  54. // do some stuff with a and b
  55. {
  56. int c = 23;
  57. // do some stuff with a, b and c
  58. }
  59. }
  60.  
  61. int a = 12;
  62. // do some stuff with a
  63.  
  64. int b = 17
  65. // do some stuff with a and b
  66.  
  67. int c = 23;
  68. // do some stuff with a, b and c
  69.  
  70. void func()
  71. {
  72. int y;
  73. //do assertions
  74. assert(something);
  75. {
  76. int const x = 5;
  77. // function body
  78. }
  79. }
  80.  
  81. const int x = 2;
  82.  
  83. const int x;
  84.  
  85. x=2;
  86.  
  87. const int * p;
  88.  
  89. extern const int x;
  90.  
  91. const int n = 0;
  92.  
  93. *((int*)&n) = 23;
Advertisement
Add Comment
Please, Sign In to add comment