Question: Code in C please convertBinToDec () - Create a function convertBinToDec() that takes an integer array as input, where each element represents one bit, and
Code in C please
convertBinToDec () - Create a function convertBinToDec() that takes an integer array as input, where each element represents one bit, and returns an integer, the decimal equivalent. For example, if the integer array [0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1] is passed into the function, the function should return the integer 9 . - The function should be named "convertBinToDec", case matters. - Use the dereference syntax and pointer arithmetic to access array elements: *( myarr + i)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
