0
What mean of this function and their use
bzero (buff,Max); n=0; While ((buff[n++]= getchar())!= `\n`);
2 ответов
0
Bzero is a function that takes an array of char as first parameter and its length as a second parameter.
It sets all the bytes to zero (b-zero) of that given array (used to be sure everything is at 0).
Then you assign in your buffer (the array you declared previously) all the characters typed : getchar allows you to catch the input, and keeps going until the while loop breaks, which is when the enter key ('\n' in ascii) is pressed.
In the end you have a sentence which has been stored.
It is used for example to get a name, age or any information from the user.
0
Thanks for explaining
You do the best..