usse return type in the function and call it in the main program.we can see thee output without using any output command.
use printf function
use putchar()
we can do it in many ways1)you will get only this sentence#include<stdio.h>#include<conio.h>void main(){clrscr();int a=10,b;b=a/0;}output:some text2)in this you can get any outputvoid display(){printf("kishore reddy");}save above program in file and save it as filename.h#include<stdio.h>#include "fiename.h"void main(){display();}
It works for DOS operating system.void main(){char sentence[]="india is great" ;char far *ptr = (char far *)0xb8000000 ;int i,j;clrscr() ;for(i=0,j=0 ; sentence[j]!= '
Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.
Copyright ©2003-2010 CoolInterview.com, All Rights Reserved. Privacy Policy | Terms and Conditions Page URL: http://www.coolinterview.com/interview/12413/default.asp?cachecommand=bypass