You don't make a C program that runs through hyperterminal, you make a C program that opens the serial port itself and sends the AT commands and reads the replies.
Are you sure you want to use C rather than C++??
If you are using C then the WIN32 API function calls you will need to look into are
BuildCommDCB Fills a specified DCB structure with values specified in a device-control string.
BuildCommDCBAndTimeouts Translates a device-definition string into appropriate device-control block codes and places them into a device control block.
ClearCommBreak Restores character transmission for a specified communications device and places the transmission line in a nonbreak state.
ClearCommError Retrieves information about a communications error and reports the current status of a communications device.
CommConfigDialog Displays a driver-supplied configuration dialog box.
EscapeCommFunction Directs a specified communications device to perform an extended function.
GetCommConfig Retrieves the current configuration of a communications device.
GetCommMask Retrieves the value of the event mask for a specified communications device.
GetCommModemStatus Retrieves modem control-register values.
GetCommProperties Retrieves information about the communications properties for a specified communications device.
GetCommState Retrieves the current control settings for a specified communications device.
GetCommTimeouts Retrieves the time-out parameters for all read and write operations on a specified communications device.
GetDefaultCommConfig Retrieves the default configuration for the specified communications device.
PurgeComm Discards all characters from the output or input buffer of a specified communications resource.
SetCommBreak Suspends character transmission for a specified communications device and places the transmission line in a break state.
SetCommConfig Sets the current configuration of a communications device.
SetCommMask Specifies a set of events to be monitored for a communications device.
SetCommState Configures a communications device according to the specifications in a device-control block.
SetCommTimeouts Sets the time-out parameters for all read and write operations on a specified communications device.
SetDefaultCommConfig Sets the default configuration for a communications device.
SetupComm Initializes the communications parameters for a specified communications device.
TransmitCommChar Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.
WaitCommEvent Waits for an event to occur for a specified communications device.
Help on these available
here.
You will also need the general IO functions below
CloseHandle Closes an open object handle.
CreateFile Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
ReadFile Reads data from a file, starting at the position that is indicated by a file pointer. This function can operate synchronously and asynchronously.
ReadFileEx Reads data from a file asynchronously.
WriteFile Writes data to a file at a position that a file pointer specifies. This function can operate synchronously and asynchronously.
WriteFileEx Writes data to a file. This function reports the completion status asynchronously by calling a specified completion routine when writing is completed or canceled and when the calling thread is in an alertable wait state.
Help on these available
here.
If rather than C you are going to use C++ or C# then are other options open to you if you use the .NET framework.