The correct answer is: B. At the edge of the wall
The maximum bending moment for a footing under a masonry wall occurs at the edge of the wall. This is because the soil pressure at the edge of the wall is greater than the soil pressure at the middle of the wall. The greater soil pressure at the edge of the wall causes the footing to bend, and the maximum bending moment occurs at the point where the bending is greatest.
Option A is incorrect because the maximum bending moment does not occur at the middle of the wall. Option C is incorrect because the maximum bending moment does not occur halfway between the middle and edge of the wall. Option D is incorrect because the maximum bending moment does not occur at a distance equal to effective depth of footing from the edge of the wall.