Answer:
The charges have same sign
Explanation:
The total electric field at a point on the line between the two charges is given by the resultant of the two electric fields produced by the two charges, which means that we must take them considering their direction.
In order to have a total electric field of zero, the two fields must have equal magnitude and opposite direction. Let's analyze different cases. Remember we are analyzing the fields at a point P located between the two charges, so it is located on the right of the left charge and on the left of the right charge:
1- Charge on the left: positive, charge on the right: negative
At point P, the electric field produced by the left charge is to the right, while the electric field produced by the right charge is to the right also, so this configuration is NOT possible
2- Charge on the left: positive, charge on the right: positive
At point P, the electric field produced by the left charge is to the right, while the electric field produced by the right charge is to the left, so this configuration is possible
3- Charge on the left: negative, charge on the right: negative
At point P, the electric field produced by the left charge is to the left, while the electric field produced by the right charge is to the right, so this configuration is possible
4- Charge on the left: negative, charge on the right: positive
At point P, the electric field produced by the left charge is to the left, while the electric field produced by the right charge is to the left also, so this configuration is NOT possible
So, the only possible configurations are the ones where the two charges have same sign.