@chittu a bit of guesswork, but are your Cube and Cylinder one Object?
Because in a situation like this:

you will not be able to connect the two.
If that is the case, you can, in Object Mode select both and then press CTRL+J to make them into one Object.