Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The two prototypes should be the following: int btod(int size, char inputBin[size]); int dtob(int inputDec); The algorithm for the main() function should be the following:

The two prototypes should be the following: int btod(int size, char inputBin[size]); int dtob(int inputDec); The algorithm for the main() function should be the following: 1. Declare needed variables 2. Prompt user to enter a binary number 3. Use scanf() to get that value 4. If getting it as a string, use strlen() to find the length of the string 5. Call btod() function sending to it the size and the value that was entered by the user and save the return value so the result can be printed out #include void printArray(int[] theAray, int size); // prototype, void function int main(void) { int array1[20]; // some code here to initialize array with values from user, // or a function call to a function that will initialize // the array with values from user printArray(array1, 20); // function call, no assignment return 0; } // function implementation with no return statement // function to print the values in an array // inputs: the array, and the size of the array so // that it can be used for arrays of different sizes // outputs: nothing is returned void printArray(int[] theAray, int size) { int i; // local variable for the for loop printf(The array values are: ); for (i = 0; i < size; i++) printf(%d , theArray[i]); printf( ); } 3 6. Prompt user to enter a decimal number 7. Use scanf() to get that value 8. Call dtob() function saving the return value in a variable so the result can be printed out Dont forget to break the program into smaller steps and compile and run AFTER EACH STEP.

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

Step: 3

blur-text-image

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

Question What integration level should an employer choose?

Answered: 1 week ago