Cin.get() and getline(cin, s[i])

  1. Regarding, cin.get(), what exactly its importance? I am able to run the program even with out it.
  2. Regarding, getline(cin, s[i]), I can run the program if the individual strings doesn’t contain spaces. Am i correct to assume getline also consider whitespaces as part of the string?

got it, i entered the strings with no whitespaces. Thats why it worked