I am trying to convert a piece of pseudo code into a C code and I have conditions like
if (-4 <= X <=8)
THEN {Do Something}
else
{Do something else}
<
Is the syntax in if statement valid?
The syntax is valid, but it won't do what you expect. <= is a normal, left-associative binary infix operator in C, so
-4 <= X <= 8
parses as
(-4 <= X) <= 8
The result of <= is a Boolean value, which C represents as 1 / 0, and both 0 <= 8 and 1 <= 8 are true.
To get the effect you want (check whether X is in a certain range), you need multiple separate comparisons combined with &&.
Can a constant be placed before the variable in the logical condition to check the truth value?
Yes. You can also compare two variables or two constants or pretty much anything.
<=, <, and all other comparisons are general operators. Their operands can be any expression you want. (Syntactically, that is; for the code to make sense the two operands also must have the same type. 5 <= "abc" is a type error.)