Which of the following is correct about shift() and cshift()? 1) shift() makes some values of Valarray equal to 0 after shifting by a non-zero

Khang Lê

New member
Which of the following is correct about shift() and cshift()?
1) shift() makes some values of Valarray equal to 0 after shifting by a non-zero number
2) cshift() makes some values of Valarray equal to 0 after shifting by a non-zero number
A. 2 only
B. 1 only
C. Both 1 and 2
D. Neither 1 nor 2
 
Answer: b
Explanation: After shifting by some non-zero number the shift() function makes some elements of Valarray equal to zero whereas cshift() does no such things.
 

Tìm kiếm

Top