dmilicev

scope_of_variable.c

Sep 28th, 2020
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3.     scope_of_variable.c
  4.  
  5.     Compiler must be set to 2011 ISO C language standard [-std=c11]
  6.  
  7.  
  8.     You can find all my C programs at Dragan Milicev's pastebin:
  9.  
  10.     https://pastebin.com/u/dmilicev
  11.  
  12. */
  13.  
  14. #include <stdio.h>
  15.  
  16. int main(void)
  17. {
  18.     int i=10;
  19.  
  20.     for(int i=1; i<=2; i++)
  21.     {
  22.         printf("%d \n",i);
  23.     }
  24.  
  25.     printf("%d \n",i);
  26.  
  27.     return 0;
  28.  
  29. } // main()
  30.  
RAW Paste Data Copied