Implementation of portscanner for a host
Use getaddrinfo only once, to resolve the host.  Do the port number iteration directly yourself.  While it might be more complicated, it also doesn't call for repeated hostname resolutions.  This also allows you to eliminate convert_int_to_string()
If you don't want IPv4 and IPv6 (which seems to be indicated by specifying AF_INET, you might be better off using the older functions.  This eliminates the complexity noted before.
As the last step in the loop, you MUST close the socket.  Otherwise, you will wind up with 1027 open descriptors.  Since current linux systems have a limit of 1024 open descriptors, your program will terminate early without this.  Other OSes will have similar limits.  Since you only ever need 4 open descriptors (or maybe 5 depending on getaddrinfo()), you should do the cleanup.
I suggest localizing variables where possible.
In convert_int_to_string(), if you start at the end of the buffer and work backwards, you can return the point in the buffer that you have reached instead of reversing the text.  Alternatively, snprintf(a, sizeof(a), "%d", num); works well.
Passing errno to error() is a mistake if errno isn't set.  This includes the wrong number of arguments error (no number) and the call to getaddrinfo() (which returns an error number and has its own function to make it a string).