Examveda

What is the use of fill() function in array class?

A. To fill an array with a given single value

B. To delete all the elements that are equal to the given value

C. To replace all the elements of the array which are equal to the given value

D. To check whether given element fills the array or not

Answer: Option A


Join The Discussion

Related Questions on C plus plus miscellaneous

What is the difference between '++i' and 'i++' in C++?

A. None of the above

B. They both have the same effect

C. '++i' increments the value of 'i' before returning it, while 'i++' increments the value of 'i' after returning it

D. '++i' increments the value of 'i' after returning it, while 'i++' increments the value of 'i' before returning it