Check out example codes for "memset array bool". It will help you in understanding the concepts better.

Code Example 1

//Array declaration
bool arr[10];

//To initialize all the elements to true

memset(arr,1,sizeof(arr));

Learn ReactJs, React Native from akashmittal.com