Algorithms_in_C 1.0.0
Set of algorithms implemented in C.
|
Octal to hexadecimal conversion by scanning user input. More...
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Functions | |
long | octalToDecimal (long octalValue) |
Convert octal number to decimal number. More... | |
char * | octalToHexadecimal (long octalValue) |
Convert octal number to hexadecimal number dynamically allocated memory needs to be freed by the calling the function free. More... | |
static void | test () |
Test function. More... | |
int | main () |
Main function. More... | |
Octal to hexadecimal conversion by scanning user input.
The octalToHexadecimal function take the octal number as long return a string hexadecimal value after conversion
int main | ( | void | ) |
Main function.
long octalToDecimal | ( | long | octalValue | ) |
Convert octal number to decimal number.
octalValue | is the octal number that needs to be converted |
char * octalToHexadecimal | ( | long | octalValue | ) |
Convert octal number to hexadecimal number dynamically allocated memory needs to be freed by the calling the function free.
octalValue | is the octal number that needs to be converted |
|
static |
Test function.