100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COSC 2436 Exam 1 questions with complete solutions

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
13-12-2024
Written in
2024/2025

COSC 2436 Exam 1 questions with complete solutions

Institution
Cosc
Course
Cosc









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Cosc
Course
Cosc

Document information

Uploaded on
December 13, 2024
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

COSC 2436 Exam 1 questions with
complete solutions
Which of the following does not need to be checked when inserting an element into a simple linear list: -
correct answer ✔✔is list empty



Which is true for a contiguous list? - correct answer ✔✔it doesn't have any 'holes' (the only blank cells, if
any, are at the very end of the array)



In a typical linear list setup: - correct answer ✔✔f you want to show the elements you need to set up a
for loop



When inserting an element in the middle of the list the following needs to be done (not necessarily in
this order):



1) check if list is full and insert index valid



2) update the count



3) place the new element in the array



4) move the elements from insert index one cell up



What is a possible correct order of these operations? - correct answer ✔✔1,4,3,2



Silent error reporting: - correct answer ✔✔enables the main program (calling the error-detecting
function ) to handle the error as it sees fit

, What typically happens when the last element of a queue is in the MAX array cell, and we need to add
yet another element? - correct answer ✔✔place the new element in array cell [1]



To properly advance through all elements of a queue (e.g. to show them) we will most likely employ a(n):
- correct answer ✔✔while loop in which we handle the index change abstractly (e.g. via next_ix ()
function)



In a queue when the last_ix (pointing to the last element added to the queue), comes up right behind
the first_ix (e.g. last_ix == first_ix-1), this is an indication that the queue is: - correct answer ✔✔full



In our parentheses checking program which of the following errors cannot be detected in the scanner
loop? - correct answer ✔✔Too many open parentheses



Which of the static data structures we covered employs two indexes: - correct answer ✔✔queue



Evaluate the following postfix expression:



4 5 + 7 2 - * - correct answer ✔✔45



If the above was evaluated via stack, what would be the final two elements on the stack before the final
result was evaluated? - correct answer ✔✔9,5



Convert A * (B + C) + D * E to postfix notation. - correct answer ✔✔A B C + * D E * +



For expression such as this :



12+3^14-2



in order to convert it to postfix to perform stack calculation, we need the following extension to the basic
algorithm (your homework). - correct answer ✔✔add exponentiation operation

introduce extra parentheses before conversion to postfix

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BravelRadon Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
873
Member since
4 year
Number of followers
540
Documents
41524
Last sold
4 days ago
EXAM HUB

Welcome to Exam Hub Are you looking for high-quality, exam-ready notes, past papers, Test Banks, and well-researched study materials to boost your grades? You’re in the right place! I create and upload detailed, easy-to-understand, and well-structured documents across multiple subjects. All my materials are designed to help you study , save time, and excel in your coursework and exams! On this page NURSING EXAMS,STUDY GUIDES,TESTBANKS AND QUALITY EXAMS IS THE KEY TO STUDENTS CAREER EXCELLENCE, you find all documents, package deals, and flashcards offered by BravelRadon (EXAM HUB STORES!)....kindly recommend a friend for A+ GARANTEEd either you are a first-year student or final-year graduation! best of luck!

Read more Read less
3.5

154 reviews

5
56
4
30
3
32
2
8
1
28

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions