NO

Author Topic: what's wrong with this code  (Read 2711 times)

rafilon

  • Guest
what's wrong with this code
« 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

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: what's wrong with this code
« Reply #1 on: January 21, 2009, 09:25:48 AM »
1. function main -> int main
2. function should return value -> return 0;

Code: [Select]
#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;
}
May the source be with you