Bignumber Addition


 
void Addition(char *f, char *s, char *ans){
	int lenf,lens,a,carry,ind;
	lenf = strlen(f)-1; lens = strlen(s)-1;
	carry = ind = 0;
	while(lens > =0 || lenf > =0){
		a = ((lens > =0) ? (s[lens--]-'0') : 0) + ((lenf > =0) ? (f[lenf--]-'0') : 0) + carry;
		ans[ind++] = (a%10) + '0';
		carry = a/10;
	}
	if(carry)ans[ind++] = carry + '0';
	ans[ind] = 0;
	reverse(ans,ans+ind);
}