#include void main() { int b; char buffer[128]; fwrite(">> ", 1, 3, stdout); // how much should we read? for (b=0; buffer[b-1] != '\n'; b++) { fread(buffer+b, 1, 1, stdin); } buffer[b] = '\0'; fwrite("Hola ", 1, 5, stdout); fwrite(buffer, 1, b, stdout); }