2

The background is that the program structures have four kinds: sequential, compositional, conditional, loop. If two programs say both using sequential program structure, then they have the same program structure(s).

May I know which of the following is grammatical?

If program a and program b have the same program structure

If program a and program b have the same program structures

1

Since each program has one structure, the correct sentence is

Program A and program B have the same structure: they both have a sequential structure.

There is a single structure, which is shared by the two programs. The “same structure” in the first sentence is the sequential structure, there is only one. Other ways to formulate this idea include

The structure of program A is the same as the structure of program B.
Both program A and program B have a sequential structure.
The structures of program A and program B are the same.

In this last example, the structure of A and the structure of B are introduced before it is claimed that they are the same, so there are two structures which are then claimed to be identical.

With the original formulation, the plural would imply that each program has many structures.

These two C programs have the same structures, defined in a common header.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.