Assume the 5 element array bounded queue abq1 contains the c
Assume the 5 element array bounded queue abq1 contains the characters in the string \"train\". What is content of abq1 after executing the instructions?
ArrayUnbndQueue<Character> abq1=new ArrayUnbndQueue<Character>();
char [ ] arr={\'t\', \'r\', \'a\', \'i\', \'n\'};
abq1.dequeue();
abq1.dequeue();
abq1.enqueue(\'t\');
Solution
Answer :
Assume the 5 element array bounded queue abq1 contains the characters in the string \"train\". What is content of abq1 after executing the instructions?
ArrayUnbndQueue<Character> abq1=new ArrayUnbndQueue<Character>();
char [ ] arr={\'t\', \'r\', \'a\', \'i\', \'n\'};
abq1.dequeue();
abq1.dequeue();
abq1.enqueue(\'t\');
Answer :
tnia
Explanation :
Assume the 5 element array bounded queue abq1 contains the characters in the string \"train\". \"tnia\" is content of abq1 after executing the instructions.
..................
