Thursday, November 28, 2013

VBS Script Pen Drive Virus Cleaner for Windows

Whenever we go to public places like cyber cafes and transfer data to pen drive, most of the time our pen drive gets infected with many viruses like trojan horses etc...

There is also a type of virus in which we connect the pen drive to our personal computer, it creates lots of shortcut of the files and folders in the pen drive and hide those files and folders. When we connect another pen drive or storage device to PC that virus also infects that device.

Friday, November 8, 2013

Same Program, But Different Output on C and C++

The C++ language began as enhancements to C, first adding classes, then virtual functions, operator overloading, multiple inheritance, templates and exception handling, among other features.

We all know that C++ is often considered to be a superset of C, but this is not strictly true. Most C code can easily be made to compile correctly in C++, but there are a few differences that cause some valid C code to be invalid or behave differently in C++.

Here are some examples of the programs, save them with extention '.c' and '.cpp', and compile & run.

Wednesday, October 23, 2013

Banker's Safety Algorithm in Operating System


When  a  new  process enters the system, it  must  declare  the  maximum number  of instances of each resource type  that  it may need. This  number  may not  exceed the total  number  of resources  in  the system.  When  a  user  requests a set of resources, the  system  must  determine  whether  the allocation of these resources will leave the system  in  a safe state.  If  it will,  the  resources are allocated; otherwise, the process  must  wait  until  some  other  process releases enough  resources.