#include<stdio.h> #include<stdlib.h> #include<math.h> int concatenateInt(int firstNumber, int secondNumber) { int count = 0; int temp = secondNumber; while (secondNumber) { secondNumber = secondNumber / 10; count++; } if (count == 0) count = 1; return (firstNumber * pow(10, count) + temp); }
Click like and share to be connected with us @ Facebook.
A place where we love to share and discuss hottest technologies, innovations and researches around.
Concatenate two integer variables in C
Labels:
Algorithms
,
C