Home » C Programming » Pointers » Question
  1. What are the different ways to initialize an array with all elements as zero?
    1. int p = 0,  q = 0,  r = 0;
      int array[5] = {p, q, r};
    2. int array[5] = {};
    3. int array[5] = {0};
    4. All of above
    5. None of these
Correct Option: D

Option A, B and C are the different ways to initialize an array with all elements as zero.



Your comments will be displayed only after manual approval.