Why doesn't ANSI C use strrev instead of creating such a big reverse function?
This code is showing me an error. Please correct it. What is the error. I am using Code::Blocks
Error message that I get:
c:\programfiles(x86)\codeblocks\mingw\bin..\lib\gcc\mingw32\4.7.1......\libmingw32.a(main.o):main.c:(.text.startup+0xa7)||undefined reference to `WinMain@16'|
#include <stdio.h>
#include <string.h>
#include <conio.h>
 void reverse(int n, char s[])
 {
     int c,i, j;
     for(i=0, j= strlen(s)-1; i<j; i++, j--){
         c=s[i];
         s[i]=s[j];
         s[j]=c;
     }
  }
 void itoa(int n, char s[])
 {
     int i=0 ,sign;
     if((sign=n) < 0 )
         n= -n;
     do{
         s[i++] = n%10 + '0';
     }while(n /=10 >0);
     if(sign <0)
         s[i++] = '-';
     s[i] = '\0';
     reverse(n, s);
 }
 
    