Question #75: Which of the following implementations of the reset function is best for initializing the array to all zero. 58% on 885 times asked
class foo{ public: foo(){ reset(); } private: void reset(){ // A // memset(x, 0, 50); // B // memset(x, 0, sizeof(x)); // C // memset(x, 0, 50 * 4); // D // memset(x, 0, 50 * sizeof(x)); } long x[50]; };