The correct option is A (−∞,4]
||x−1|+a|=4
⇒|x−1|+a=4 or |x−1|+a=−4
⇒|x−1|=4−a or |x−1|=−4−a
As |x−1|≥0
So, 4−a≥0 or −4−a≥0
⇒a≤4 or a≤−4
⇒a≤4
Hence, a∈(−∞,4]
Alternate:
||x−1|+a|=4
Since, |x−1|≥0 (always)
⇒||x−1|+a|≥a (always)
For ||x−1|+a|=4, the maximum value of a can be 4
∴a∈(−∞,4]