I know solidity codes and coded one smart contract.I want to know is if I want to list this contract on one exchange.is it ok or not. can this exchange accept this codes to exchange with other coins?
If the contract you coded is for example an ERC20 token, it may be added to an exchange. If it's not an ERC20 token it will most likely not be added as the exchanges would have to added special implementation for it. I believe ERC20 is currently the only widely used token standard - ERC721 is starting to lift its head but it's not being added to major exchanges (at least yet).
The question about how a token gets added to an exchange is another matter. If you want to get your token added to an exchange, you should probably contact the exchange directly and ask about it.