how can u draw a rectangle in C
Answers were Sorted based on User's Feedback
Answer / ketan bhavsar
Using a rectangle(int,int,int,int)function of c graphics.
Is This Answer Correct ? | 431 Yes | 38 No |
Answer / m.d.balaji
using rectangle(int,int,int,int)
<left,top,right,bottom>
it is a function in graphics.h
Is This Answer Correct ? | 228 Yes | 21 No |
Answer / m.d.balaji
USING rectangle(int,int,int,int)
it is a function in graphics.h
Is This Answer Correct ? | 135 Yes | 20 No |
Answer / sala
including graphics.h
then initialising graphics system using initgraph
and using the function rectangle(int left,int top,int
right,int bottom)
Is This Answer Correct ? | 114 Yes | 15 No |
Answer / raj
/* simple.c
example 1.0
*/
#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT, gm;
initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
rectangle(200,50,350,150);
getch();
closegraph();
}
Is This Answer Correct ? | 105 Yes | 13 No |
Answer / suganya
using rectangle(int right,int top,int left,int bottom) in
graphics.h
Is This Answer Correct ? | 83 Yes | 21 No |
Answer / mahendra microsoft
/* simple.c
example 1.0
*/
#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT, gm;
initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
rectangle(200,50,350,150);
getch();
closegraph();
}
Is This Answer Correct ? | 67 Yes | 12 No |
Answer / venkat
BY using #include<graphics.h>
we can draw rectangle.
The syntax is rectangle(int ,int ,int ,int)
{left,top,right,bottom}
Is This Answer Correct ? | 56 Yes | 7 No |
Answer / azad
first include the graphics.h file
thus you can use the rectangle funtion give the proper
parameters and the wor is done
Is This Answer Correct ? | 56 Yes | 17 No |
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
main() { char not; not=!2; printf("%d",not); }
main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }
write a origram swaoing valu without 3rd variable
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).
13 Answers Intel, Microsoft, TCS,
C program to print magic square of order n where n > 3 and n is odd
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error