For cash game $40 is on the fence between playing 1/2 and 2/5 (cents). If you are a newer player I would stick to 1/2. For tournaments as Yermek mentioned above MTT tournaments $0.50 are your max buy-in and for sit n go tournaments you can play $0.50 or even $1.00 double ups if you like those.
You are a little under rolled for $0.50 tournaments, so if your roll swings down to $30 dollars I would stick to $0.25 tournaments and lower.
well if to adhere to an aggressive bankroll, then it is possible to play Fifty50 Buy in of $1.5, knowing from these SNG it is possible to climb itself not bad
I'm in the same situation as you. I'm playing tournaments .25 or .50 cents maximum . I'll make it up to $ 100 , it will take a while but we gain experience.
When I started playing (at pokerstars) I began with the 0.25 dollar spin and go'es. The only tip I can give you is, don't be to fast with playing the bigger games (1 dollar or more). I guess you play for plesure and ofcourse some sweet profit.
I would play the 5/10c tables. it's seems a little easier to make a profit. depends on your skill to read and not over invest in the wrong pots. I think the rule of thumb is 100X your big blind or something as to the stakes you should play for a bankroll of 40 bucks but don't quote me, look it up. that would mean you should play 1/2c. goodluck
Play tournaments from the lower to the higher buy-ins, and try the 'Sunday storm'.You can also try and some cash tables starting from the lower buy-ins.