all io in unix is done through file descriptors hence the saying "Everything in unix is a file" so you need do nothing more than to open your device node and start writing to it(assuming the serial port is set up)
something like:
Code:
main()
{
int fd;
char *x = "command for modem"; //dont forget to remove the \0 if you dont want it
fd = open("/dev/ttyUSB0", O_RDRW);
write(fd, x, sizeof(x));
...
...
}
you could of course just use cat or echo to send your command to the modem but it sounded like you wanted some C code so there you go.
<edit>
by hoarenet
I suspect you use the pipe symbol "|" and point your command to the modem port.
you dont want to use | cos that passes the output to the next command you would use > to redirect stdout of cat/echo to the device node. eg
echo "modem command" > /dev/ttyUSB0
</edit>