When two groups have different averages, use total \(=\) (avg\(_1\)\(\times\)size\(_1\)) \(+\) (avg\(_2\)\(\times\)size\(_2\)), or set up a weighted-average equation and solve for the group size.
Step 1: Convert averages to total marks.
Overall average \(=35\) for \(120\) candidates \(\Rightarrow\) total marks \(=120\times 35=4200\).
Step 2: Let the number of passed candidates be \(p\).
Then failed candidates \(=120-p\).
Total marks \(=\) (passed total) \(+\) (failed total)
\[ 39p + 15(120-p) = 4200. \]
Step 3: Solve for \(p\).
\[ 39p + 1800 - 15p = 4200 \Rightarrow 24p = 2400 \Rightarrow p = 100. \] \[ \boxed{100} \]