Home / MCQ Bank / Computer
Computer Arrays And Strings In C Plus Plus

How do you initialize all elements of an integer array named 'arr' to zero in C++?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • for (int i = 0; i < size; ++i) { arr[i] = 0; }

Related Computer Questions

You should choose Sleep option when Which of the following is not a valid e-mail address? What is the purpose of the fgets function in C? Which of these methods must be made static? The datatype best suited to store currency values is ______