Hello friends, I have written a mini book on Cyber Security awareness for you, named "Hacking into Hackers' Head". This book uses common terms to explain things, and I'm sure you will get benefitted from it in your day to day life. It's available on Kindle and Google Play. Grab your copy now.

Thursday, September 13, 2012

C++ program to turn num lock on/off

Hi friends, In my previous posts related to c++, I have told about many tricks in c++. Today I am going to tell you a trick in C++ by which you can turn on/off the num lock button and led as well on your keyboard.
If you are a C++ programmer then I am sure that you will like this post.

Steps:
1. Open C++(any compiler).
2. Copy and paste the following code.

#include<stdio.h>
void main()
{
char far *kb;
kb=(char far *)0x417;
*kb=112;
}

3. Compile and run the program.
Compilation process may differ according to your compiler.


Enjoy hacking.

No comments:

Post a Comment

We appreciate your valuable comments.

Scroll to Top