I tried using cin and cin.getline but the string does not get stored.
When I used cin to input string it worked but with cin.getline() it does not work
#include
#include
using namespace std;
int main() {
char s[5];
int k;
cin>>k;
cin.getline(s,5);
cout<<k<<s;
return 0;
}