C Program to Print a Character without using any Output Statements
Submitted by Srikanth on Sunday, 25 November 20076 Comments
This program can be used to print character without using any output statements. This program only works in 16-bit mode since it directly writes to VDU Memory.
#include<stdio.h>
#include<conio.h>
void main()
{
char far *p=(char far *)0xb8000000;
*p=’A';
getch();
}
#include<conio.h>
void main()
{
char far *p=(char far *)0xb8000000;
*p=’A';
getch();
}
Related Posts
By using/following this site you agree to our Legal Disclaimer

it gives an error saying
“cannot convert unsigned long to char far*”
try this
char far *p=(char far*)0xb8000000;
1 error C2143: syntax error : missing ‘;’ before ‘*’
2 error C2065: ‘p’ : undeclared identifier
3 error C2146: syntax error : missing ‘)’ before identifier ‘far’
4 error C2059: syntax error : ‘)’
5 error C2065: ‘p’ : undeclared identifier
these are the 5 errors I’m gettin.
First of all this program is compiler dependent can only be compiled by 16-bit compiler under windows.So if you are using Linux or modern compilers such as VC++ or 32-bit C++ compilers the program does not work.32-bit compilers do not have the concept of near,far huge pointers..
So this my be the cause for errors in your case
Cool dude………
wat does Oxb8000000 do….
Leave your response!
I am the author and founder of GoHacking. You can read more about me or get in touch with me on Google+ or contact page.
EMAIL SECURITY »
What to Do When Your Email Account is Hacked?
How to Recover Hacked Email Accounts?
It can be a real nightmare if someone hacks and takes control of your email account as it may contain confidential information like bank logins, credit card details and other sensitive data. …
HOW STUFFS WORK »
How Antivirus Software Works
Due to ever increasing threat from virus and other malicious programs, almost every computer today comes with a pre-installed antivirus software on it. In fact, an antivirus has become one of the most essential software package for every computer. Even though every one …
HOW-TO GUIDES »
How to Retrieve Clipboard History in Windows
Ever copied a code snippet or text from the web and forgot to paste it before you copied something else? Well, all of us will have an experience of something like this, where we want to …
INTERNET SECURITY »
How to Hide Data in Image, Audio & Video Files: Steganography
Ever wondered to know how to hide secret messages in images, audio and video files? Well, in this post I will take you through a concept called steganography using which, it is possible to hide your secret information …
NETWORK HACKS »
Customize Google to Improve Search Results
Google is indisputedbly the best search engine out there on the Internet, however there are a few ways by which you can customize Google and make it even better. I have got 3 best free Firefox extensions using which you …
Categories
Most Popular
Most Commented
Blogroll
Log In | Entries (RSS) | Comments (RSS) | Sitemap
© 2008-2012 GoHacking.Com. This content is copyrighted to Srikanth and may not be reproduced on other websites.