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 brs test reply me email me kashifabbas514@gmail.com
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
Write a program that reads a dynamic array of 40 integers and displays only even integers
main() { show(); } void show() { printf("I'm the greatest"); }
void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); } main() { int a[10][10]; func1(a); func2(a); } a. Ok it works b. Will this work? c. Ok it worksWill this work? d. None of the above
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!
main() { extern int i; i=20; printf("%d",sizeof(i)); }
which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!