#include<bits/stdc++.h>
using namespace std;
int main(){
int length;
cin>>length;
string s(length,'\0');
cin>>s;
cout<<s;
}
int the code above firstly im taking a int length and then using it to define the size of the string but the issue is that when i cin>>s
after defining length the string still takes more char's than length
i.e OUTPUT->
3
Hello
Hello
this should not happen after defining length of the string,