the image shows the input taken and output shown .
I am taking character array as input and printing it, now when i print it, it print input characters as well as some additional random characters, why so??
#include<iostream>
int main()
{
int n;
std::cin>>n;
char array[100];
for(int i=0; i<n; i++)
{
std::cin>>array[i];
}
std::cout<<array;
return 0;
}
I was expecting it to be printing the letters that i provides as input but it is printing additional character as well as.