In a C lab this uber simple code appears:
#include <stdio.h>
int suma (int a, int b)
{
return a+b;
}
int mult (int a, int b)
{
return a*b;
}
int main(void)
{
int a,b;
printf ("Operando 1: ");
scanf("%d",&a);
printf("Operando 2: ");
scanf("%d",&b);
printf("%d+%d=%d\n",a,b,suma(a,b));
printf("%d*%d=%d\n",a,b,mult(a,b));
return 0;
}
by looking at the code I'm supposed to determine to which C standard it is compliant (ANSI, ISO or de facto K&R). After reading this and this I'm inclined to say that it's compliant to the three standards. Would that be correct?