Guest User

Untitled

a guest
Mar 18th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int a, b, c=30;
  5.  
  6. void printout();
  7.  
  8. int main(int argc, char*argv[]) {
  9.  
  10. a=10;
  11. b=20;
  12.  
  13. printout();
  14.  
  15. printf("\n\n in main-block :");
  16. printf("\n a= %d", a);
  17. printf("\n b= %d", b);
  18. printf("\n c= %d", c);
  19.  
  20. if(1){
  21. int a=100;
  22. float b=3.6;
  23.  
  24. printf("\n\n in if-block :");
  25. printf("\n a= %d", a);
  26. printf("\n b= %f", b);
  27. printf("\n c= %d", c);
  28. }
  29.  
  30. printf("\n\n exit if-block but still in main-block :");
  31. printf("\n a= %d", a);
  32. printf("\n b= %d", b);
  33. printf("\n c= %d", c);
  34.  
  35. printout();
  36.  
  37. return 0;
  38. }
  39.  
  40. void printout(){
  41. int d=40;
  42.  
  43. printf("\n\n in printout function :");
  44. printf("\n a= %d", a);
  45. printf("\n b= %d", b);
  46. printf("\n c= %d", c);
  47. printf("\n d= %d", d);
  48. }
Add Comment
Please, Sign In to add comment