Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Reading spaces in C
  2. char *Description;
  3. scanf("%s", Description);
  4. strcpy(word[i].description,Description);
  5.        
  6. fgets(word[i].description, LEN, stdin);
  7.        
  8. scanf("%99[^n]", word[i].description);
  9.        
  10. char Description[2048];
  11. scanf( "%s", Description );
  12.        
  13. char Description[32]; // or whatever size you think is adequate
  14. fgets( Description, sizeof(Description), stdin );