Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 / priyanka

#include<graphics.h>
#include<conio.h>
#include<stdio.h>
void main()
{
int gdrive=DETECT,gmode;
initgraph (&gdrive,&gmode,"c:\tc\bin");
rectangle((50,50),(50,100),(100,100),(100,50));
getch();
}

Is This Answer Correct ?    2 Yes 2 No

how can u draw a rectangle in C..

Answer / logeshwaran

rectangle

Is This Answer Correct ?    2 Yes 2 No

how can u draw a rectangle in C..

Answer / pramod

printf("Rectangle");

Is This Answer Correct ?    2 Yes 2 No

how can u draw a rectangle in C..

Answer / anjali

by using C compiler and keyboard.

Is This Answer Correct ?    1 Yes 1 No

how can u draw a rectangle in C..

Answer / priyanka

rectangle(int,int,int,int);
and with few parameters
and der's no necessity of using graphics.h
n sorry if i am wrong. . .

Is This Answer Correct ?    1 Yes 1 No

how can u draw a rectangle in C..

Answer / nithiya

#include<grpahics.h>
void main()
{
int gd=0,gm;
initgraph(&gd,&gm,"x:\\tc\\bgi");
rectangle(int,int,int,int);
}

Is This Answer Correct ?    1 Yes 1 No

how can u draw a rectangle in C..

Answer / amaresh

rect(x1,y2,x2,y2)

Is This Answer Correct ?    0 Yes 0 No

how can u draw a rectangle in C..

Answer / akshay

Include graphics library
then either use rectangle function in it or using line fuction
adjust coordinates for it to make a rectangle

Is This Answer Correct ?    1 Yes 2 No

how can u draw a rectangle in C..

Answer / ram kumar

include the header file graphics.h
use the built in function rect(x1,y1,x2,y2)
such that (x1,y1) and (x2,y2) are the coordinates

Is This Answer Correct ?    10 Yes 12 No

how can u draw a rectangle in C..

Answer / nitheesh

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int left, top, right, bottom;

/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");

/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg
(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Code Interview Questions

Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.

2 Answers   Mentor Graphics, Microsoft,


const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above

1 Answers   emc2, HCL,


main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 Answers   CSC,


In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }

1 Answers  


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

1 Answers  


main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }

2 Answers   IBM,


how to return a multiple value from a function?

5 Answers   Wipro,


main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }

7 Answers  


programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h

1 Answers  


main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }

2 Answers  


main() { printf("%x",-1<<4); }

3 Answers   HCL, Sokrati, Zoho,


main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }

1 Answers  


Categories