Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.the state of 20bit register is 1100000110101001110101base2 .assuming a floating point representation is used to represent numbers and the sign +,- denoted by bit 0,1

1.the state of 20bit register is 1100000110101001110101base2 .assuming a floating point representation is used to represent numbers and the sign +,- denoted by bit 0,1 respectively write the base 10 equivalent of the number in the register.

2.given the following declaration, #define n 20 typedef structure {char name [10][8]; int Number; } Aa [n]; Aa a; and assuming 4 bytes and 2 bytes of storage are used for Integer and character respectively and a column major technique is used to implement the array then obtain the fomular for the address of name [i][j] of any component of a;

3. using appropriate structure write a function that takes in two polynomial and returns their product

4. write down the necessary declaration for the implementation of a graph based on the following representation (i). incidence matrix (ii) adjacent list. hence write a code for each implementation for two nodes on the graph

5. write down the c++ declaration for the implementation of a string using linked storage structure and provide a function that a. concatenate two strings b. removes all occurrence of character b from a string c. search for given substring in a string 6. check photo attached

image text in transcribed

FACULTY OF COMMUNICATION AND INFORMATION SCIENCES DEPARTMENT OF COMPUTER SCIENCE 2015/2016 B.SC DEGREE HARMATTAN SEMESTER EXAMINATION IN COMPUTER SCIENCE COURSE CODE CSC317 COURSETITLE: DATA STRUCTURE INSTRUCTION: Answer any three questions TIME: 2his 1. The management of a supermarket, decides to kep a database, D, of information about her customers. A customer may be a buyer or a supplier. An information about a customer consists of the name and the address of the customer, the date of transaction and the items and prices ofthe items bought or supplied by the customer Information about the quantity of each item avallable is also kept. The folowing information is expected to be displayBoughtitems Customa,datet): displays all the items bought by customa on the date, date1, from supplietitem2): returns the suppller of item item isSuppliercustoma): check If customa is a supplier displayltemsSortecp:display allitems instore and their quantities in sorted order with respect to item name the super-market and the total cost of the items [faqueney orse 20%] [frequency ofuse: 3%) (frequency of use: 2%. (frequency of use: 30%) displatenitem 1): displays the cu n quantity a fthe price fit ItemL fre ency of/se:35% ow how the data base might be represented in memory using appropriate data structure. Wirite down the aration for the structure shown, in Java orC++ Basel on your deciaration, provide the code for the function/methods, displayltemsSortod0, oughtitems (Customa,date1) Time is priced (valued) over store, and itamis suppliod by diterent suppliens ae diaren 2 (a)Answer the following questions with respect to the tree just below. 60 70 50 50 80 identify the following on the tree (a)root node (b) right sibling of node 50 (o) leaf nodes (d) height of the tree The balance factors of nodes, 10, 60, 70 (i) Is the above tree a binary atree? Give reasonts) to support your answer. (iv) Show in a diagram a memory representation of this tree and write down the necessary declaration for the representation (W Perfornming the necessary rotation operations, to convert the above tree intu a balanoad tres (performing your conversion procedure from left to rig)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

8. Explain the contact hypothesis.

Answered: 1 week ago

Question

2. Define the grand narrative.

Answered: 1 week ago