You have double quotes ( " ) inside the string (in the grep command). And double quotes are also the delimiters of string (characters arrays) in C.
To have double quotes inside a string you have to use
double double quotes. (In this case you could also use single quotes around the regexp in the grep command.
single single quotes, or single back quotes are fine)
Summary of your program (also using the other tip kev82 mentioned, and with an error of swapped single quote and back quote fixed that your command has at the end of the awk command):
Code:
#include <stdlib.h>
int main ()
{
system("/usr/suid/webofc/getdata | suid-to webofc "
"ssh `grep ""^10.0.0.1"" /etc/hosts | head -n 1"
"| awk '{print $4}'` -C suid putdata update && "
"suid updatefirewall && suid updatemirrorhosts");
return 0;
}