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 are qualifiers?
Can the curly brackets { } be used to enclose a single line of code?
Explain how do you generate random numbers in c?
Why n++ execute faster than n+1 ?
c program for searching a student details among 10 student details
Calculate 1*2*3*____*n using recursive function??
Give basis knowledge of web designing ...
What is the g value paradox?
Add Two Numbers Without Using the Addition Operator
What is the default value of local and global variables in c?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
How can I implement sets or arrays of bits?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above