Error message

Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in require_once() (line 837 of /usr/local/www/drupal7/sites/all/modules/libraries/libraries.module).

Gültigkeit von Variablen

Code: 
#include <stdio.h>
 
/* Gueltigkeit von Variablen
   Matthias Fechner
   tutor@fechner.net
   21.04.2004 */
 
void func1(int);
int func2(int);
 
int main(void)
{
   int i=10,j;
 
   printf("i=%d\n",i);
 
   func1(i);
   printf("i=%d\n",i);
 
   i=5;
   printf("i=%d\n",i);
 
   i=func2(i);
   printf("i=%d\n",i);
   for(j=0;j<3;j++)
   {
      int i=2;
      printf("i=%d\n",i);
   }
   printf("i=%d\n",i);
}
 
void func1(int i)
{
   printf("i=%d\n",i);
   i=100;
   printf("i=%d\n",i);
   return;
}
 
int func2(int i)
{
   printf("i=%d\n",i);
   return(55);
}
Result: 
~/c_tutor> gcc gueltigkeit.c                                idefix@idefix_mobil
~/c_tutor> ./a.out                                          idefix@idefix_mobil
i=10
i=10
i=100
i=10
i=5
i=5
i=55
i=2
i=2
i=2
i=55
Source File: