C Program to Print a Character without using any Output Statements
Submitted by Srikanth on Sunday, 25 November 20075 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();
}
Popularity: 1% [?]
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………
Leave your response!
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-TO GUIDES »
How to Detect Anonymous IP Addresses
As the fraudsters are now becoming more sophisticated in bypassing the Geo-location controls by using proxies (Anonymous IPs) to spoof their IP address, it has become very much necessary to come up with a means …
INTERNET SECURITY »
How to Detect Anonymous IP Addresses
As the fraudsters are now becoming more sophisticated in bypassing the Geo-location controls by using proxies (Anonymous IPs) to spoof their IP address, it has become very much necessary to come up with a means …
NETWORK HACKS »
How to Hack an Ethernet ADSL Router
Almost half of the Internet users across the globe use ADSL routers/modems to connect to the Internet however, most of them are unaware of the fact that it has a serious vulnerability which can easily be exploited even by a …
VIRUS CREATION »
How to Test the Working of your Antivirus – EICAR Test
Have you ever wondered how to test your Antivirus software to ensure it’s proper working? Well here is a quick and easy way to test your antivirus. The process is called EICAR test which will …
Categories
Blogroll
Recent Comments
Most Commented
Most Popular
Log In | Entries (RSS) | Comments (RSS) | Sitemap