Let $M$ be a set and $A,B,C$ given subsets of $M$. Find a necessary and sufficient condition for the existence of a set $X\subset M$ for which $(X\cup A)\backslash(X\cap B)=C$. Describe all such sets.
1. **Define the function \( S(X) \):**
   Given subsets \( A \), \( B \), and \( C \) of a set \( M \), we define the function \( S(X) \) for any subset \( X \subseteq M \) as:
   \[
   S(X) = (X \cup A) \setminus (X \cap B)
   \]
   We need to find a necessary and sufficient condition for the existence of a subset \( X \subseteq M \) such that \( S(X) = C \).

2. **Analyze the necessary conditions:**
   - If \( A \) contains elements not in \( B \cup C \), then for any \( X \), \( S(X) \) will contain these elements. Therefore, no \( X \) can satisfy \( S(X) = C \) in this case.
   - If \( B \cap C \) contains elements not in \( A \), then for any \( X \), \( S(X) \) will not contain these elements. Thus, no \( X \) can satisfy \( S(X) = C \) in this case.

   Hence, a necessary condition is:
   \[
   A \cap \bar{B} \cap \bar{C} = \varnothing \quad \text{and} \quad \bar{A} \cap B \cap C = \varnothing
   \]

3. **Verify the sufficiency of the condition:**
   - Assume the condition \( A \cap \bar{B} \cap \bar{C} = \varnothing \) and \( \bar{A} \cap B \cap C = \varnothing \) holds.
   - Define \( X_0 \) as:
     \[
     X_0 = (A \cap B \cap \bar{C}) \cup (\bar{A} \cap \bar{B} \cap C)
     \]
   - We need to show that \( S(X_0) = C \).

4. **Calculate \( S(X_0) \):**
   - First, compute \( X_0 \cup A \):
     \[
     X_0 \cup A = (A \cap B \cap \bar{C}) \cup (\bar{A} \cap \bar{B} \cap C) \cup A = A \cup (\bar{A} \cap \bar{B} \cap C)
     \]
   - Next, compute \( X_0 \cap B \):
     \[
     X_0 \cap B = (A \cap B \cap \bar{C}) \cup (\bar{A} \cap \bar{B} \cap C) \cap B = A \cap B \cap \bar{C}
     \]
   - Now, compute \( S(X_0) \):
     \[
     S(X_0) = (X_0 \cup A) \setminus (X_0 \cap B) = \left( A \cup (\bar{A} \cap \bar{B} \cap C) \right) \setminus (A \cap B \cap \bar{C})
     \]
   - Simplify the expression:
     \[
     S(X_0) = \left( A \cup (\bar{A} \cap \bar{B} \cap C) \right) \setminus (A \cap B \cap \bar{C}) = C
     \]

5. **Describe all such sets \( X \):**
   - For any subsets \( P \subseteq A \cap \bar{B} \cap C \) and \( Q \subseteq \bar{A} \cap B \cap \bar{C} \), we have:
     \[
     S(X_0 \cup P \cup Q) = C
     \]
   - If \( X \) contains any element in \( \bar{A} \cap \bar{B} \cap \bar{C} \), then \( S(X) \) will also contain this element, and thus \( S(X) \neq C \).
   - If \( X \) contains any element in \( A \cap B \cap C \), then \( S(X) \) will not contain this element, and thus \( S(X) \neq C \).

   Therefore, the sets \( X \) that satisfy \( S(X) = C \) are precisely those of the form \( X_0 \cup P \cup Q \) where \( P \subseteq A \cap \bar{B} \cap C \) and \( Q \subseteq \bar{A} \cap B \cap \bar{C} \).

The final answer is \( \boxed{ X_0 \cup P \cup Q } \) where \( P \subseteq A \cap \bar{B} \cap C \) and \( Q \subseteq \bar{A} \cap B \cap \bar{C} \).