char str[] = \"beautiful earth\"; memset(str, \'*\', 6); printf(\"%s\", str); Output: ******ful earth
Like the above use of memset, can we initial
I tried the following program and it appears that you can initialize your array using memset() with -1 and 0 only
#include #include void printArray(int arr[], int len) { int i=0; for(i=0; i