title: Using memset for integer array in C
body: <pre><code>char str[] = "beautiful earth";
  memset(str, '*', 6);
  printf("%s", str);
  
  Output:
  ******ful earth
  </code></pre>
  
  <p>Like the above use of memset, can we initialize only a few integer array index values to 1 as given below?</p>
  
  <pre><code>int arr[15];
  memset(arr, 1, 6);
  </code></pre>