Given long long int x, y;, I want a function that can compare x & y and returns T/F Flag, which is a normal int 32-bit. I tried this, but it confused me
#include <stdio.h>
int main() {
long long n,i;
scanf("%l64d", &n);
i=42;
printf("%l64d", n);
printf("%l64d", i);
printf("\ni<=n --> %d\n",i<=n);
return;
}
Maybe what you are seeking is exemplified by this (which returns true/1 or false/0 depending on whether
xis greater than (gt)y):Repeat for the other comparisons…
Arithmetic is more problematic – often, the result of adding two
long longvalues is too big to fit into a 32-bitint.However, your question is very sketchy on details and this might be quite wide of the mark. You should explain what you really want much more clearly.