user25054: Can I spend Inputs with 0 confirmations?? If I could, are there some restrictions?

user24601: If the input is coinbase transaction, you can't spent it until it get 100 confirmations. Relevant code is here 
If the input is not a coinbase transaction, you can spend it by creating a raw transaction How To Create A Raw Transaction
However, receiving input with 0 confirmation is not recommended. 

Zero-confirmation transaction vulnerability: accepting
  zero-confirmation transactions (transactions that have not yet been
  included in a block) from somebody you do not trust is still not
  recommended, because there will always be ways for attackers to
  double-spend zero-confirmation transactions. However, this release
  includes a bug fix that makes it a little bit more difficult for
  attackers to double-spend a certain type ("lockTime in the future") of
  zero-confirmation transaction.


user28129: With the exception of freshly mined coins, it is possible to spend unconfirmed funds - though it depends on which wallet you use.  The bitcoin-core, cli version, will by default only spend funds with at least one confirmation, but it's possible to override, i.e. using the sendfrom command:
sendfrom "fromaccount" "tobitcoinaddress" amount ( minconf "comment" "comment-to" )

Set minconf to 0 and you're done.
Be aware of the trust issue; if you receive funds from someone you don't trust and send the coins further to someone that trusts you, you could put your reputation on line if the original sender pulls a double-spend.
If the original transaction carried a low fee and that's the reason why it hasn't been included in the blockchain yet, the new transaction may help to get it confirmed faster

25054: <p>Can I spend Inputs with 0 confirmations?? If I could, are there some restrictions?</p>
 24601: <p>If the input is coinbase transaction, you can't spent it until it get 100 confirmations. Relevant code is <a href="https://github.com/bitcoin/bitcoin/blob/1d9d314573ee48f6f51107265f1cf1fa9e36c998/src/consensus/consensus.h#L14" rel="nofollow">here</a> <br>
If the input is not a coinbase transaction, you can spend it by creating a raw transaction <a href="https://bitcoin.org/en/developer-examples#simple-spending" rel="nofollow">How To Create A Raw Transaction</a></p>

<p>However, receiving input with 0 confirmation is not recommended. </p>

<blockquote>
  <p>Zero-confirmation transaction vulnerability: accepting
  zero-confirmation transactions (transactions that have not yet been
  included in a block) from somebody you do not trust is still not
  recommended, because there will always be ways for attackers to
  double-spend zero-confirmation transactions. However, this release
  includes a bug fix that makes it a little bit more difficult for
  attackers to double-spend a certain type ("lockTime in the future") of
  zero-confirmation transaction.</p>
</blockquote>
 28129: <p>With the exception of freshly mined coins, it is possible to spend unconfirmed funds - though it depends on which wallet you use.  The bitcoin-core, cli version, will by default only spend funds with at least one confirmation, but it's possible to override, i.e. using the sendfrom command:</p>

<pre><code>sendfrom "fromaccount" "tobitcoinaddress" amount ( minconf "comment" "comment-to" )
</code></pre>

<p>Set minconf to 0 and you're done.</p>

<p>Be aware of the trust issue; if you receive funds from someone you don't trust and send the coins further to someone that trusts you, you could put your reputation on line if the original sender pulls a double-spend.</p>

<p>If the original transaction carried a low fee and that's the reason why it hasn't been included in the blockchain yet, the new transaction may help to get it confirmed faster</p>
