title: generate a matrix with random zeros
body: <p>Using C I am trying to generate a matrix which has to have more number of zero elements than non zero elements. The zero elements should be random how to generate it. </p>
  
  <p>I am able to generate random numbers with some elements as zero, but the zero elements should be more than non-zero elements</p>
  
  <pre><code>int main(){
       srand(time(NULL));
       int array[25];
       int i;
       for (i=0;i&lt;s;i++){
           if (rand()%3 == 0)
                array[i]=rand()%3;
           else
                array[i] = rand();
       }
   }
  </code></pre>
  
  <p>is the generated matrix sparse matrix ? how can I understand the difference ?</p>