Pelles C forum

C language => Beginner questions => Topic started by: rafilon on January 21, 2009, 03:57:27 AM

Title: what's wrong with this code
Post by: rafilon on January 21, 2009, 03:57:27 AM
#include <stdio.h>

main ()

{
   int x;
   x = 7;

   printf("The value of integer variable x is %d", x);


}

Thanks
Title: Re: what's wrong with this code
Post by: TimoVJL on January 21, 2009, 09:25:48 AM
1. function main -> int main
2. function should return value -> return 0;


#include <stdio.h>

int main(int argc, char **argv)
{
   int x;
   x = 7;

   printf("The value of integer variable x is %d", x);
   return 0;
}