Write a function checksmaller

Assignment Help Database Management System
Reference no: EM13333152

1) Write a function 'CheckSmaller' that takes two linked list as input arguments. These linked list contain numbers like this:

num1->3->5->2->NULL (this linked list represents a decimal number 352)
num2->4->3->9->1->NULL (it represents a decimal number 4391)

The function CheckSmaller should return 1 if num1 points to a linked list which represents a smaller number than the number pointed to by num2 linked list. Otherwise, it returns -1. If both linked list point to exactly the same number, CheckSmaller returns a 0.

int CheckSmaller(Node* num1, Node* num2);

For example, if two linked lists are:

num1->8->4->2->NULL (assuming that number 1 is 842) and
num2->8->4->3->NULL (assuming that number 2 is 843)
then your function should return 1 since 842 is smaller than 843.

2) Write a function 'Max' that takes an int array and the size of the array as input and returns the largest element of the array. The function should look like the following:
int Max(int a[], int size);

 

Reference no: EM13333152

Questions Cloud

Explain the infrared region of electromagnetic radiation : An astrophysicist working at an observatory is interested in finding clouds of hydrogen in the galaxy. Usually hydrogen is detected by looking for the Balmer series of spectral lines in the visible spectrum. Unfortunately, the instrument that dete..
What will be the change in the bonds price in dollars : The firm recently became more financially stable and the rating agency is upgrading the bonds to BBB. The new appropriate discount rate will be 7.1%. What will be the change in the bond's price in dollars
Compute net paid holidays worked for a full-time employee : the metropolis health system managers are also working on their budgets for next year. each manager must annualize his or her staffing plan, and thus must convert staff net paid days worked to a factor.
State heated at constant volume until its pressure increases : A) (25 pts) Consider a 1.00 mol sample of acetylene (C2H2) is allowed to undergo the following two step, reversible process: the gas is a) first heated at constant volume until its pressure increases from 2.5 atm to 3.2 atm
Write a function checksmaller : Write a function 'Max' that takes an int array and the size of the array as input and returns the largest element of the array. The function should look like the following.
What strategies can implement to create a positive outcome : The Fed is scheduled to meet in one week to assess economic conditions and set monetary policy. Economic growth has been high, but inflation has also increased from 3 percent to 5 percent (annualized) over the last four months.
What will the value of the coefficient restitution have : suppose we place a small explosive charge on one of the bumpers so that it would explode on contact, pushing the 2 cars apart. What will the value of the coefficient restitution have
Define what is the wavelength of the radiation : A microwave oven operates at 3.00GHz . What is the wavelength of the radiation produced by this appliance? Express the wavelength numerically in nanometers.
Prepare the journal entry to record each of the transaction : Prepare the journal entry to record each of the following independent transactions. (Use the number of the transaction in lieu of a date for identification purposes.) 1. Services provided on account of $1,530

Reviews

Write a Review

Database Management System Questions & Answers

  Draw relational schema and show functional dependencies

Draw relational schema and show functional dependencies Comprehensive schema that shows existing PK and all functional, partial and transitive dependencies Detailed schema that shows existing PK and most functional, partial and transitive dependen..

  Create database for easydrive school of motoring

Create mission statements and mission objectives for database systems explained in the following case study EasyDrive School of Motoring. Also in mission objectives include 10 reports that the database system must support

  Activity diagram for information gathering component

The prototype program should be running without errors throughout the two Phases: Information Gathering and Information Presenting.

  Create a database design - relational data model

Create a database design specification Enhanced Entity Relationship Diagram (EERD) and Relational Data Model from the given business description - Database Management System

  Create database db2game

LOAD FROM "C:\db2game\tutors.csv" of del insert into tutors (student_id, given_name, family_name, course_code, hourly_wage, status);

  Role and tasks performed by database administrator

In 250 - 300 words describe role of a database administrator and the tasks performed by this role. Also, describe why this role is important in Database Management.

  Describe the different operations of relational algebra

Describe relationships with the example. Also illustrate degree of relationship for that example. Describe the different operations of relational algebra with suitable example each.

  Define the importance of various system analysis

By now you should have a "toolbox" full of useful design and analysis tools. List the tools in your toolbox and then write one short paragraph on how you can/will apply them in your careers, lives, etc.

  What is the functionality of the tool

What is the functionality of the tool and what is the actual running environment (software and hardware) of the tool - how will you evaluate the tool based on your own experience?

  Program to build a database concerning employee information

Company XYZ needs a program to build a database concerning employee information.

  Various kinds of keys to form or define relationships

Relational database is based on fact that data in one table can be tied, or related to data in another table. To do this, database utilizes various types of keys to form or define these relationships.

  Explain meaning of expression acid transaction

What is lock granularity? Explain the use of BEGIN, COMMIT, and ROLLBACK TRANSACTION statements. Explain the meaning of expression ACID transaction.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd