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 |
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
What is "far" and "near" pointers in "c"...?
There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
#include<stdio.h> int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
I need your help, i need a Turbo C code for this problem.. hope u'll help me guys.? Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply the remaining six (6) values and determine the exact location of each value in the array. Example: Input: Sum of row 1: 6 Sum of row 2: 15 Sum of row 3: 24 Sum of column 1: 12 Sum of column 2: 15 Sum of column 3: 18 Value 1: 3 Value 2: 5 Value 3: 6 Output: Sum of Row 1 2 3 6 4 5 6 15 7 8 9 24 Sum of Column 12 15 18 Note: Your program will not necessary sort the walues in the array Thanks..
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
main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
How to read a directory in a C program?
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }