Just try using getline() function. this function will read string untill it encounters a '\n' or termination count provided in function itself. This is quite simple. Better read a good C programming. If you get to read, must fo through K&R or Gottfried. If you a mewbie in C programming better read Yashwant kanetkar.Its ideal for new comers....