Examveda

Which of the following(s) is/are the correct way of assigning values to a forward_list f?

A. f.assign({1,2,3,4,5})

B. f.assign(10,5)

C. both f.assign({1,2,3,4,5}) and f.assign(10,5)

D. f.assign(1,1,1,1)

Answer: Option C


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