What is the difference between getchar() and cin | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

What is the difference between getchar() and cin

27th Nov 2016, 2:04 PM
RaVVan
RaVVan - avatar
2 ответов
0
Hello Harshit Grover. The difference is that you cannot input space ' ', new line '\n', tab '\t' and etc with cin. If you want to input one of these, you have to use getchar().
27th Nov 2016, 2:33 PM
Lasha Kitia
Lasha Kitia - avatar
0
Thanx really helpful
22nd Feb 2017, 5:22 PM
Aitish Kumar
Aitish Kumar - avatar