The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes
41 views asked in Programming by Active (1.1k points) | 41 views

1 Answer

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;



answered by (11 points)

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

33,707 questions
40,253 answers
38,874 users