Bueno el siguiente problemita que dejo o que me hicieron es el siguiente:

Hacer una funcion que sume dos numeros pero que sea introducidos los numeros como String es decir "12554" y la salida tambien te devuelve un String.

Aqui lo que implemente es crear una funcion que pase los numeros de String a Integer (StrToInt) en C, y otra funcion que lea la cantidad de digitos que tenemos, y bueno usaremos una funcion que ya hemos dado que es la Potencia de un numero.

Calculoa los digitos de numero:

Código:
int digitos(int num)
{
    int i=0, temp;

     while(temp>10)
     {
          i = i + 1;
          temp = num/10;        
          num = temp;                     
     }   
     
     return i+1;
}
Pasamos los numeros de String a Integer:

Código:
int StrToInt(char num[MAX])
{
    int i, j, size, tamano;
    
    char numero[11] = "0123456789";
    int number[10] = {0,1,2,3,4,5,6,7,8,9};
    
    int temp=0;
    
    size = strlen(num);
    tamano = size;
    
    for(i=0;i
    {
       for(j=0;j<11;j++)                
       {
          if(num[i]==numero[j])
          {            
            tamano = tamano - 1;
            temp = temp + number[j]*potencia(10,tamano);
          }
       }
    }
    
    return temp;
}
Bueno y aqui nuestra funcion:

Código PHP:
#include 
#include 

#define MAX 1000
char* sum(char num1[MAX], char num2[MAX]); int StrToInt(char num[MAX]); int potencia(int base, int exponente); int digitos(int num);
int main()
{
    
char numeroA[MAX];
    
char numeroB[MAX];
    
char numeroC[MAX];
    
    
printf("A: ");
    
scanf("%s",&numeroA);
    
printf("\nB: ");
    
scanf("%s",&numeroB);
    
    
printf("%s + %s = %s",numeroA,numeroB,sum(numeroA, numeroB));
    return 
0;
}
char* sum(char num1[MAX], char num2[MAX])
{  
     
int temp, val, temp1, temp2, temp3;
     
int size, i, j, tamano;
     
     
char temporal[MAX]="";
     
     
int number[10] = {0,1,2,3,4,5,6,7,8,9};
     
char numero[11] = "0123456789";
     
     
temp1 = StrToInt(num1);
     
temp2 = StrToInt(num2);
     
     
temp3 = temp1 + temp2;

     
size = digitos(temp3);
     
tamano = size;
     
     for(
i=0;i<size;i++)
     {
          
tamano = tamano - 1;
          
temp = temp3%potencia(10,tamano);        
          
val = temp3/potencia(10,tamano); 
          
temp3 = temp;           

          for(
j=0;j<10;j++)
          {
             if(
val==number[j])
               
temporal[i]=numero[j];
          }  
     }        
       
     return 
temporal;         
}
int digitos(int num)
{
    
int i=0, temp;

     while(
temp>10)
     {
          
i = i + 1;
          
temp = num/10;        
          
num = temp;                     
     }   
     
     return 
i+1;
}
int StrToInt(char num[MAX])
{
    
int i, j, size, tamano;
    
    
char numero[11] = "0123456789";
    
int number[10] = {0,1,2,3,4,5,6,7,8,9};
    
    
int temp=0;
    
    
size = strlen(num);
    
tamano = size;
    
    for(
i=0;i<size;i++)
    {
       for(
j=0;j<11;j++)                
       {
          if(
num[i]==numero[j])
          {            
            
tamano = tamano - 1;
            
temp = temp + number[j]*potencia(10,tamano);
          }
       }
    }
    
    return 
temp;
}
int potencia(int base, int exponente)
{
    
int i, temp=1;
    
    for(
i=0; i<exponente; i++)
       
temp = temp*base;
       
    return 
temp;
}