In the U.S. and most jurisdictions around the world, it is illegal to send viruses and malware. U.S. law is quite clear on this, as established by the Computer Fraud and Abuse Act of 1986. ... You may then wonder why viruses get transmitted if such a thing is illegal.
Okeke Emmanuel The truth will always come out on it's own. Whether it's you being framed or you sending a virus. Also, your first attempt at anything, at programming or otherwise, probably won't work the way you want it to.
Define virus and you will start getting your requirements.. is it for Windows, unix or mac.. what do you wish to achieve with that.. mind you the antivirus apps can sniff out malicious code.. my two cents.. avoid it.. dont tread on what is illegal.. unless you want to just learn what it is.