how can u draw a rectangle in C

Answers were Sorted based on User's Feedback



how can u draw a rectangle in C..

Answer / ketan bhavsar

Using a rectangle(int,int,int,int)function of c graphics.

Is This Answer Correct ?    431 Yes 38 No

how can u draw a rectangle in C..

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

how can u draw a rectangle in C..

Answer / soumya

using include<graphic.h>

Is This Answer Correct ?    185 Yes 41 No

how can u draw a rectangle in C..

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

how can u draw a rectangle in C..

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

how can u draw a rectangle in C..

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

how can u draw a rectangle in C..

Answer / suganya

using rectangle(int right,int top,int left,int bottom) in
graphics.h

Is This Answer Correct ?    83 Yes 21 No

how can u draw a rectangle in C..

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

how can u draw a rectangle in C..

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

how can u draw a rectangle in C..

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

Post New Answer

More C Code Interview Questions

#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

1 Answers  


Write a program to print a square of size 5 by using the character S.

6 Answers   Microsoft,


#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

1 Answers  


Is the following code legal? struct a { int x; struct a *b; }

2 Answers  


main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }

1 Answers  


What are the files which are automatically opened when a C file is executed?

1 Answers  


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,


main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }

1 Answers  


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


why nlogn is the lower limit of any sort algorithm?

0 Answers  


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


Categories