how can u draw a rectangle in C
Answers were Sorted based on User's Feedback
Answer / mohan
by using graphic header file
ex:
#include"graphic.h"
main()
{
rect(100,150,50,200);
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / bhargav
c 4 computer
so u can draw a rectangle using paint.
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / senthilkumar
First we insert the graphics mode into your complier,and we
use the function rectangle(); in the rectangle function we
specified the length and breath,and we also specified where
the place in screen the rectangle is drawn.
| Is This Answer Correct ? | 10 Yes | 14 No |
Answer / swatter
These are all non-standard libraries for graphics, they
arent used at all in today's date. They are libraries which
where introduced 20 yrs back and same with turbo C!
| Is This Answer Correct ? | 1 Yes | 5 No |
Answer / subhradip
printf("____________________");
printf("\n|\t\t|\n|\t\t|\n|\t\t|\n|\t\t|");
printf("____________________");
by this way i think can be possible,though some
adjustment may required...as per size of VDU.As per my
opinion intervier asked for this answer....as C graphics is
not so popularly used.
Pardon me if i'm wrong & can also mail to me.
| Is This Answer Correct ? | 20 Yes | 56 No |
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
Give a oneline C expression to test whether a number is a power of 2?
25 Answers EA Electronic Arts, Google, Motorola,
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list)
3 Answers Disney, Google, ZS Associates,
Cau u say the output....?
main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }
#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }
Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
Finding a number which was log of base 2