I was wondering if there is a way to obtain public key of a public address where the address does not have any output transaction
I assume that you are talking about a Pay to Public Key Hash (P2PKH) address.
Cryptographic hash functions have the pre-image resistance property:
Given a hash value
h, it should be difficult to find a message
h = hash(m).
P2PKH addresses encode a locking script that commits funds to the hash of a public key. Given that the address only provides the hash, it is not possible to guess the public key from the address as that would require breaking the pre-image resistance property of RIPEMD-160.