Memset implementation?
Memset implementation?
@anmolaggarwal.432 simply run a for loop for the size of the container and assign the desired value.
For eg:
int arr[100];
// suppose we want to assign 5 value to all.
// memset(arr, 5, sizeof(arr));
for (int i = 0; i < 100; i++) {
arr[i] = 5;
}
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.