What do you have problems with?
Code is working and clear.
.assign() member function have several overloads.
One of them takes two integers. First one tells how many values should be in new deque, second one tells what these values are.
So after line 11
first will contain 7 integers with value of 100.
Secon assign() variant takes pair of iterators and assigns to deque values from first up to second iterator.
So after line 16
second will contain 5 integers with value 100
And after line 16
third will contain values 1776, 7, 4
size() member function returns number of values stored inside container. So it is expected to return 7, 5, 3 for respective containers.
http://en.cppreference.com/w/cpp/container/deque/assign
Also I noted that your example is outdated (does not showing C++11 Initializer list assigment) and does not use C++11 features. Also on lines 21-23 you do not need custom cast to int. In fact deque size can be larger that int can hold, so it is dangerous.