1. If you meet someone on the street, you should say hello to him.

2. If you meet someone on the street, you should say hello to him or her.

3. If you meet someone on the street, you should say hello to them.

4. If you meet someone on the street, you should say hello to the person.
---------------------------------
Which expressions are grammatical? Can we use 'him' as in Sentence 1? What about the others?

1, 2, and 4 are grammatically correct.

Using "him" as in 1 was the common usage until about the 1960s and 1970s.

You can fix 3 by using "people" rather than "someone."

All of the given sentences are grammatically correct, but they vary in terms of gender inclusivity and formality. Here's a breakdown of each sentence:

1. If you meet someone on the street, you should say hello to him.
- This sentence assumes that the person you meet is male. It does not account for the possibility of meeting someone who identifies as female or non-binary. As such, it may not be inclusive for all individuals.

2. If you meet someone on the street, you should say hello to him or her.
- This sentence addresses the possibility of meeting someone of any gender. By using "him or her," it aims to be inclusive and cover all individuals.

3. If you meet someone on the street, you should say hello to them.
- This sentence uses a singular "they" pronoun, which is a gender-neutral option. It allows for inclusivity without specifying any gender. The use of "them" instead of "him" or "her" reflects this.

4. If you meet someone on the street, you should say hello to the person.
- This sentence is more formal and general but still conveys the message effectively. It avoids using gendered pronouns altogether by using the word "person" instead.

In conclusion, while all of the sentences are grammatically correct, sentences 2, 3, and 4 are more inclusive in terms of gender and may be preferred when you want to avoid assuming someone's gender.