it is quite possible that you would get housing loan of 40 Lakhs with this salary. But you also need to consider details such as your age, existing loans and margin.
Home loan is a long-term commitment and the tenure could be up to 30 years. If your age should be at least below 70 at the date of maturity. All banks have an age limit as a criterion to check your eligibility.
Secondly, if you have existing loans, the lenders might think twice before giving you the home loan. The monthly outgo for the loans including future home loan should not cross 50% of your monthly salary. If your debt to income ratio is beyond 50%, it could be difficult for you to get a home loan.
The minimum margin money for your loan amount could be 10 to 15 percentage. Hence only if you are able to pay the margin amount, you will be able to secure the home loan.
By keeping in mind, the above-mentioned points, you will be able to obtain a home loan successfully.