当两个 long long int 给出的结果大于 long long int 时,它们的总和?

Sum of two long long int when they give a result bigger thant long long int?

当结果将大于 C 中的 long long int 时,是否有可能对两个不同的 long long int 变量求和?

正如 OP 想要 "print the result in the screen",将数字分成两部分:最高有效数字和最低有效数字。

#include <stdlib.h>

void print_long_long_sum(long long a, long long b) {
  if ((a < 0) == (b < 0)) {  // a and b of the same sign?
    // Sum the Most-Significatn_Digits and Least-Significant Digit separately
    int sumLSD = (int) (a % 10 + b % 10);
    long long sumMSDs = a / 10 + b / 10 + sumLSD / 10;
    sumLSD %= 10;
    printf("sum = ");
    if (sumMSDs) {
      printf("%lld", sumMSDs);
      // Since sign already printed, insure next print is positive
      sumLSD = abs(sumLSD); 
    }
    printf("%d\n", sumLSD);
  } else { // No need to separate as there is no chance for overflow
    printf("sum = %lld\n", a + b);
  }
}