Skip to content

Instantly share code, notes, and snippets.

@mapio
Created January 31, 2013 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mapio/4683150 to your computer and use it in GitHub Desktop.
Save mapio/4683150 to your computer and use it in GitHub Desktop.
Non si può insegnare C al primo anno!
#include <stdio.h>
int main( int argc, char *argv[] )
{
printf( "Salve, %s!\n" );
return 0;
}
#include <stdio.h>
int main( int argc, char *argv[] )
{
printf( "Salve, %s!\n", argv[ 1 ] );
return 0;
}
#include <string.h>
#include <stdio.h>
int main( int argc, char *argv[] )
{
char stringa[ 100 ];
strcpy( stringa, argv[ 1 ] );
printf( "Salve, %s!\n" );
return 0;
}
@monga
Copy link

monga commented Jan 31, 2013

gcc -Wall strana.c -o strana

segnalerebbe un warning per la printf usata male

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment