Page 1 of 1

Answer Q2(a) and Q2(b)(i)-Q2(b)(v) based on the information given in Figure Q2. Figure Q2 Write the output for the pro

Posted: Tue Jul 12, 2022 8:28 am
by answerhappygod
Answer Q2 A And Q2 B I Q2 B V Based On The Information Given In Figure Q2 Figure Q2 Write The Output For The Pro 1
Answer Q2 A And Q2 B I Q2 B V Based On The Information Given In Figure Q2 Figure Q2 Write The Output For The Pro 1 (236.97 KiB) Viewed 44 times
Answer Q2(a) and Q2(b)(i)-Q2(b)(v) based on the information given in Figure Q2.
Figure Q2
Write the output for the program. (12 marks) Determine whether each of the following statements is TRUE or FALSE. (i) The myFunction2 () and MyFunction5() functions demonstrate insertion of a new node in the middle of a linked list. (2 marks) (ii) The myFunction5 () function demonstrates similar task in stack operation that is to remove a node from the top of the stack. (2 marks) (iii) Given a new node, we can use myFunction5 () function to insert the new node at the beginning of a linked list or at the top of a stack. (2 marks) (iv) The myFunction1() and myFunction2() functions are meant to perform removal and insertion process respectively for a queue. (2 marks) (v) The myFunction4 () function is used to check whether a linked list contains node(s) or otherwise. (2 marks) (vi) The myFunction2 () function performs the same task as the push operation in a stack. (2 marks) (vii) The myFunction1() and myFunction6() functions demonstrate implementation of node removal. (2 marks) (viii) The myFunction6 () function demonstrates implementation of insertion in a linked list, that is similar to enqueue operation in a queue. (2 marks) (ix) The myFunction4 () function demonstrates implementation of non-recursive function to check the existence of node(s) in a linked list. (2 marks) (x) The myFunction3() function is used to display content of a node at the beginning of a linked list only. (2 marks)