Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

We can draw a box in cprogram by using only one printf();&
without using graphic.h header file?

Answer Posted / penchalaiahdinesh

There is another method to print a box without using
graphic.h
using Ascii values

You can see ascii values by running following program..

#include<stdio.h>
#include<conio.h>
main()
{
int i;
clrscr();
for(i=0;i<=255;i++)
printf("%d %c\t",i,i);
getch();
}

The below are the program to print a clear box
#include<stdio.h>
#include<conio.h>
main()
{
int i=218,j,k=1;
clrscr();
printf("%c",i);
x:i=196;
for(j=1;j<=10;j++)
printf("%c",i);
if(k==2)
goto y;
i=191;
printf("%c\n%c %c\n%c",i,179,179,192);
if(k==1)
{k=2;goto x;}
y:printf("%c",217);
getch();
}

Just this and reply me........

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you please explain the difference between malloc() and calloc() function?

1130


What does sizeof return c?

1073


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1080


What are different types of variables in c?

1084


What is the difference between a string and an array?

1216


What's a good way to check for "close enough" floating-point equality?

1170


Does * p ++ increment p or what it points to?

1125


What is return in c programming?

980


What are disadvantages of C language.

1168


Why is event driven programming or procedural programming, better within specific scenario?

2442


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

1284


What is the use of static variable in c?

1093


What is a buffer in c?

1010


What is #define used for in c?

1067


When the macros gets expanded?

1434