Solveeit Logo

Question

Digital Electronics Question on Programmable Logic Array

int g(int p)
{
printf("%d", p);
return p;
}
int h(int q)
{
printf("%d", q);
return q;
}
void f(int x, int y)
{
g(x);
h(y);
}
int main ()
f(g(10), h(20));
}
What is the o/p printed ? (parameters all evaluated from left to right)

Answer

The answer is 10,20,10,20.