Program To Print A String Without Using Any Output Statements
Submitted by Srikanth on Friday, 30 November 20075 Comments

This program can be used to print a string without using any output statements such as printf, puts etc. However this program only works in 16-bit mode since it directly writes to VDU Memory
#include<stdio.h>
#include<conio.h>
char str[]=”Hello Srikanth”;
char far *v=(char far *)0xb8000000;
void main()
{
int i;
for(i=0;i<14;i++)
{
*v=str[i];
v+=2;
}
getch();
}
#include<conio.h>
char str[]=”Hello Srikanth”;
char far *v=(char far *)0xb8000000;
void main()
{
int i;
for(i=0;i<14;i++)
{
*v=str[i];
v+=2;
}
getch();
}
Popularity: 1% [?]
By using/following this site you agree to our Legal Disclaimer


if you use linux:
int main(){
char code[]= “\xeb\x18\x59\xb8\x04\x00\x00\x00\x31\xdb”
“\xba\x18\x00\x00\x00\xcd\x80\xb8\x01\x00\x00\x00\x31\xdb”
“\xcd\x80\xe8\xe3\xff\xff\xff\x49\x27\x6d\x20\x66\x6f\x72\x6d\x61″
“\x74\x74\x69\x6e\x67\x20\x6d\x79\x20\x62\x72\x61\x69\x6e\x0a” ;
int (*func)();
func = (int (*)()) code;
(int)(*func)();
return 0;
}
hey buddy that was awesome
but please cn u also explain the logic
this is not working it simply shows the 3 errors the error is illegal character so what i do
@ biswajit das
This program works only on a 16-bit C/C++ compiler.
plzz explain the logic behind this code..
thank you!
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