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

What is the size of structure in c?

922


What is the difference between test design and test case design?

1870


What is the size of enum in c?

871


write a program fibonacci series and palindrome program in c

835


Explain what is meant by high-order and low-order bytes?

870


What will be your course of action for a push operation?

885


Explain the difference between call by value and call by reference in c language?

903


What is a constant and types of constants in c?

874


Define VARIABLE?

937


write a program to find the given number is prime or not

4347


if p is a string contained in a string?

1642


What is the difference between break and continue?

1026


What is const volatile variable in c?

815


What are the types of functions in c?

785


Are negative numbers true in c?

813