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
Explain the use of 'auto' keyword in c programming?
The statement, int(*x[]) () what does in indicate?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Which are low level languages?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
How can I change their mode to binary?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
write a program to copy the string using switch case?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Explain what is output redirection?
Why is %d used in c?
Should a function contain a return statement if it does not return a value?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
What is 2c dna?
What are disadvantages of C language.