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
What is the size of structure in c?
What is the difference between test design and test case design?
What is the size of enum in c?
write a program fibonacci series and palindrome program in c
Explain what is meant by high-order and low-order bytes?
What will be your course of action for a push operation?
Explain the difference between call by value and call by reference in c language?
What is a constant and types of constants in c?
Define VARIABLE?
write a program to find the given number is prime or not
if p is a string contained in a string?
What is the difference between break and continue?
What is const volatile variable in c?
What are the types of functions in c?
Are negative numbers true in c?