Hello,
As you have mentioned that your general rank is 840 and your branch rank is 281 which indeed is a good rank.
Now, if you belong to general category it is very tough. last year's fourth round cut off was around 850–900 (164 marks ) . Now, the cutoff changes every year depending on various factors.. So, this year the cutoff might have changed by 10 to 15 marks.
So, looking this whole scenario you have decent chances to get mechanical engineering.
All the best!
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile