Purchase Solution

C program working with arrays, list, macro

Not what you're looking for?

Ask Custom Question

1.Begin this program by creating two arrays of integers, each holding ten elements of data. Create a third array of integers for a result array. Your main program will take the two arrays of integers and pass them to the function subtract(). Inside the function, subtract the first array from the second array and put the difference into the third array. Print the values of all three arrays back in the main program.

2.Write a C program containing a linked list of ten integer numbers. Have the program display the numbers in the list.

3.Write a C program which defines and uses a macro min(x,y) that, when given two numbers, returns the smaller of the two.

Attachments
Purchase this Solution

Solution Summary

A C program (not C++) that works with two arrays of integers holding 10 elements each. A third array is created that holds the results of subtraction of items between the two arrays. Also linked list of integers is created, displayed and disposed. Macro functionality shown.

Solution Preview

File compiled and tested in Miracle C. All 3 tasks are in program. The results should look like this:

===================
Program (1) ...

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.