Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The code cin.ignore (16, \'\ \'); a Reset the stream status if I/o stream got fa

ID: 3692481 • Letter: T

Question

The code cin.ignore (16, ' '); a Reset the stream status if I/o stream got failure gets and discards up to 16 characters or until "newline" character receive input as 16 characters or until "newline" character send output of as 16 characters or until "newline" character pick up one sorting algorithm with the best efficiency from the following: bubble sorting selection sorting merge sorting insertion sorting In the following code, a certain amount of memory is allocated for an integer array: ini *Pt; Pt = new int[300]; To release the memory after the array was used, which of the following code is correct? delete Pt; delete [ ] Pt; close(); assert (Pt ! = 0) pt rightarrow x_center - 10.0; Which statement is equivalent to the above statement? (*pt) rightarrow_x_center = 10.0; (*pt).x_center - 10.0; (*pt.)x_center= 10.0; (pt rightarrow)x_center - 10.0; None of the above. In a doubly -linked list, how many pointer fields arc needed in each node? 0 1 2 None of above Which of the following docs the C++ language not support? dynamical memory allocation global variables automatic present memory leaking object oriented programming Which operator destroys a dynamically allocated object (release memon)? Delete distinct deallocate destroyer

Explanation / Answer

14.
   b. gets and discard up to 16 characters ot until 'newline' characters
       Extracts characters from the input sequence and discards them,
       until either n characters have been extracted, or one compares equal to delim.
15.   c. merger sort
           worst case complexity = (nlogn), all other have O(n^2) worst case
          
16.   b. delete [] ptr; => to delete an array

17.   b. (*pt).x_center = 10;

18. c. 2 => one for next and one for previous

19. c. atomic preventing memory leaking. you need to delete all allocated memory by youself

20. A. delete - used to delete dynamically allocated memory

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote