C Program to display the results without Output command

Note:– This program works only on a 16-bit C/C++ compiler.

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 Ravi”;
char far *v=(char far *)0xb8000000;
void main()
{
int i;
for(i=0;i<14;i++)
{
*v=str[i];
v+=2;
}
getch();
}

People who read this also read:

  • No Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *