In the Constructor why we take default size 7.
If we Create an Object of Queue as q(10) then default size will be changed or not?
Implementation of Queue using circular array
Hey, default value is given to a variable when it is mostly equal to a given value but it is sometime different.
So,here we take default size 7 just to keep a default value .
Yes,q(10) will change the size of queue but not default value.
So,for current queue size is 10 but for next time if you don’t give a value then size will be 7.If you give a size then size will be equal to that value.