Language: C++

int add(char *retstr, char *str1, char *str2){

	int str1len=strlen(str1);
	int str2len=strlen(str2);
	char ad,i1,i2;
	char offset1,offset2;
	char c1,c2;
	bool carry=false;

	if(str1len>str2len){
		offset1=0;
		offset2=str1len-str2len;
	}else{
		offset1=str2len-str1len;
		offset2=0;
	}

	for(int i=max(str1len,str2len);i<82;++i){
		retstr[i]=0;
	}

	for(int i=max(str1len,str2len)-1;i>=0;--i){

		if(i-offset1>=0){c1=str1[i-offset1];}else{c1=48;}
		if(i-offset2>=0){c2=str2[i-offset2];}else{c2=48;}
		i1=c1-48;i2=c2-48;//Ascii code to Number

		ad=i1+i2;
		if(carry)++ad;//桁上がり分

		if(ad>=10){ad %= 10; carry=true;}else{carry=false;}
		retstr[i+1]=ad+48;
	}

	if(carry){
		retstr[0]=1+48;
	}else{
		retstr[0]=0+48;
		for(int i=0;i<strlen(retstr)-1;++i){
			retstr[i]=retstr[i+1];
		}
		retstr[strlen(retstr)-1]=0;
	}

	if(strlen(retstr)>=81)return 1;

	return 0;

}

int main(){

	int n,overflowed;
	char str1[82], str2[82], retstr[82];

	cin>>n;

	for(int i=0;i<n;++i){

		cin>>str1;
		cin>>str2;

		if(strlen(str1)>=81||strlen(str2)>=81){
			cout<<"overflow"<<endl;
		}else{
			overflowed=add(retstr, str1, str2);
			if(overflowed){
				cout<<"overflow"<<endl;
			}else{
				cout<<retstr<<endl;
			}
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int add(char*, char*, char*)':
a.cc:3:21: error: 'strlen' was not declared in this scope
    3 |         int str1len=strlen(str1);
      |                     ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int add(char *retstr, char *str1, char *str2){
a.cc:18:19: error: 'max' was not declared in this scope
   18 |         for(int i=max(str1len,str2len);i<82;++i){
      |                   ^~~
a.cc:22:19: error: 'max' was not declared in this scope
   22 |         for(int i=max(str1len,str2len)-1;i>=0;--i){
      |                   ^~~
a.cc: In function 'int main()':
a.cc:56:9: error: 'cin' was not declared in this scope
   56 |         cin>>n;
      |         ^~~
a.cc:63:20: error: 'strlen' was not declared in this scope
   63 |                 if(strlen(str1)>=81||strlen(str2)>=81){
      |                    ^~~~~~
a.cc:63:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:64:25: error: 'cout' was not declared in this scope
   64 |                         cout<<"overflow"<<endl;
      |                         ^~~~
a.cc:64:43: error: 'endl' was not declared in this scope
   64 |                         cout<<"overflow"<<endl;
      |                                           ^~~~
a.cc:68:33: error: 'cout' was not declared in this scope
   68 |                                 cout<<"overflow"<<endl;
      |                                 ^~~~
a.cc:68:51: error: 'endl' was not declared in this scope
   68 |                                 cout<<"overflow"<<endl;
      |                                                   ^~~~
a.cc:70:33: error: 'cout' was not declared in this scope
   70 |                                 cout<<retstr<<endl;
      |                                 ^~~~
a.cc:70:47: error: 'endl' was not declared in this scope
   70 |                                 cout<<retstr<<endl;
      |                                               ^~~~