I was actually returning a float
value when I typed ,
instead of .
but it did not give me any error. Then I tried running the below code.
#include<stdio.h>
#include<conio.h>
int getValue();
int main()
{
int a = getValue();
printf("%d", a);
return 0;
}
int getValue()
{
return 2, 3;
}
Now the output is 3, that is it returned the second value. This happened two years ago and was searching for the proper answer since then.
Studying answers to this question I came to know that it returns the second value after evaluating, but what does it do with the first one?
I studied the logic of the stack(how the values are pushed and pop internally) but I don't think this have anything to do with it.
Does it processes the two values or do something else?