in Programming in C
244 views
0 votes
0 votes
in Programming in C
by
244 views

1 Answer

0 votes
0 votes

I think option C is the answer. Since the program uses 'mark' field to identify the counted nodes we have to set mark=1 somewhere in the program. So that leaves us with option A and C.
Lets look at option A, if we put a->mark=1 as the first statement then the If condition gets satisfied and the program ends there.

Therefore the line should be after the if statement

If(a->mark) return 0;

a->mark=1;