Software development engineer in test - print output if i call f(5)?
Software Design Engineers in Test SDET FAQ
(Continued from previous question...)
19. Software development engineer in test - print output if i call f(5)?
Question:
void f(int n)
{
if(n>0)
{
f(--n);
printf("%d ",n);
f(--n);
}
}
print output if I call f(5);
Answer:
very tricky . try it out and then run the code to check the output.output is not symmetrical, left and right subtree differ .
(Continued on next question...)
Other Interview Questions
|