write a simple calculator c program to perform addition,
subtraction, mul and div.
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
Derive expression for converting RGB color parameters to HSV values
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,
#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
Code for 1>"ascii to string" 2>"string to ascii"
1 Answers Aricent, Global Logic,
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }