Question: 1) In C programing A) Create a function with the declaration long Factorial(long num); The function should calculate the factorial of the given value and
1) In C programing
A) Create a function with the declaration long Factorial(long num); The function should calculate the factorial of the given value and return the value Print out the given number and the calculated factorial Test with 5 values that are entered by the user of the program
B) Create a function: int HighestBitSet( int value ); In the function determine the position of the highest bit that is set (0 index) Print out the value as a decimal value, in binary and the highest bit set Example: Value = 9 Binary = 1001 Highest bit set = 3 Test your function with 5 different values entered by the user
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
