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 c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
write a c-program to find gcd using recursive functions
Write a C program to add two numbers before the main function is called.
#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
Code for 1>"ascii to string" 2>"string to ascii"
1 Answers Aricent, Global Logic,
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;
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.
Find the largest number in a binary tree
main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above
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).