Character array

so when we will initailize the char type array that time we must have. to give /0 other wise it will contain garbage value right that’s the only point

It is true with respect to cout
Cout print the elementscharacter array till it encounter ‘\0’
So we have to put ‘\0’ at the end of character arrays

when we only initialise then only we have to give this when we cin it at that time it will automatically take

and in int type array we must have to use loop and in char or string we just need to cout the name of the array it will be printed

Yes
Only at time of initialisation

Yes this is functionality of cout
This is how cout works

and if we want to give input like hello world how we will take for white spaces I have to use cin.get but how I will write just clear once like we have to take both char c[100][100]and then for row take loop and ciin.get after that or else how just clear me once

or else like this we have to write. #include using namespace std; int main() { char c[100]; cin.get(c,100); cout<<c<<endl; return 0; }

just please confirm it once

i didn’t understand this
can you explain your question

if we want to take input like hello world and output hello world how we will do that explain me that and send me the code for that also

for white space we have to use cin.get how we will write that the way I just want to know

I will write like cin.get(c,100); or some other way is there how we have to write just tell me please

to do so there are 2 ways

//Method 1

    cin.getline(arr,100);

    cout<<arr<<endl;
//Method 2 
    cin.get(arr,100);
    cout<<arr<<endl;

i think I have share a resource with you regarding this in your previous doubt

have you go through that?

I am asking that only that how would I write there is row and coloum both so we are taking ciin.getline(a[row],100); but here only one so we would have to take cin.get(c,100); name and size of that boat in cin.get like this we have to write

we just have to take the name and the size both in cin.get() right and rest all same

i think you are asking about this
check that

the name and the size both in cin.get bracket that only I just want to know I am correct or not I just want to confirm that

okay I hope now your doubt clear

is it clear?

cin.getline(arr[i],100)

I am asking when we have to take input only for one like give array char c[100]; after that cin.get(c,100); after that cout<<c this is correct or not this is what I am asking