This paper examines the Hausdorff dimension of the level sets f−1(y) of continuous functions of the form
\begin{equation*}
f(x)=\sum_{n=0}^\infty 2^{-n}\omega_n(x)\phi(2^n x), \quad 0\leq x\leq 1,
\end{equation*}
where φ(
x) is the distance from
x to the nearest integer, and for each
n, ω
n is a {−1,1}-valued function which is constant on each interval [
j/2
n,(
j+1)/2
n),
j=0,1,. . .,2
n − 1. This class of functions includes Takagi's continuous but nowhere differentiable function. It is shown that the largest possible Hausdorff dimension of
f−1(
y) is
$\log ((9+\sqrt{105})/2)/\log 16\approx .8166$
, but in case each ω
n is constant, the largest possible dimension is 1/2. These results are extended to the intersection of the graph of
f with lines of arbitrary integer slope. Furthermore, two natural models of choosing the signs ω
n(
x) at random are considered, and almost-sure results are obtained for the Hausdorff dimension of the zero set and the set of maximum points of
f. The paper ends with a list of open problems.