I don't remember the exact syntax, however I've heard that
return a==b;
is valid c (like in gcc does not complain)
Yes, it's valid C (assuming appropriate declarations of a and b), and
yes, I expect that gcc wouldn't complain about it. (There are a number
of things, gcc-specific extensions, that gcc doesn't complain about
by default, even though they aren't valid C (though just what "valid C"
means is subject to some debate).)
my questions:
1) is this real C standard?
2) as there is no true nor false in C (just 0 and not 0) what does
a==b have for a value, if any?
As your C reference should tell you, the "==" operator yields a result
of type int, with the value 1 if the operands are equal and 0 if they
are not.
In general, built-in operators that yield "boolean" results yield 0
for false, 1 for true. Library functions such as isupper() return 0
for false, some unspecified non-zero value for true. Contexts that
require a condition (such as an if or while) treat 0 as false,
anything else as true.
(C99 adds a built-in boolean type, but all the existing rules stay the
same.)
The comp.lang.c FAQ is at <
http://www.c-faq.com/>. Section 9 covers
"Boolean Expressions and Variables".