The output of this code is whowing 'H' irrespective of input...

#include<bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
int T ;
cin>>T ;
while(T–){
char S[100] ;
scanf ("[^\n]*c", S) ;
printf("%s",S) ;
}
return 0;
}