Why the output for first element coming zero?

0 is coming in the output when i try to initaialize the size of deque as q(4) otherwise the output is correct


u make a deuque with size 4 that means first 4 elements are initialised to 0 and then add 1,2,3,4
hence u get o/p

if u just initialise a dequeue object then no element is added and the element that u add using push_back is the first to be popped out