Title: Technical Paper - C Post by: Tanya on June 06, 2007, 12:01:27 AM Technical Paper - C 1.) Output of folowing C code void main() { int i=4,j=5; printf("%f",i/j); } (a) 0 (b) 0.8 (c) 1 (d) None of these Ans-> (d) 2.) In which of the following postfix notations there is no confusion between unary and binary minus. [note:I am not sure about the choices] (a) a*b-- (b) a--bc 3.) Output of folowing C code void main() { int i=0,j=0; int arr[4][4] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; clrscr(); for (i=2;i>=0;i--) for(j=2;j>=0;j--) printf("%d ", *(*(arr+j)+i)); getch(); } (a)11 10 9 7 6 5 3 2 1 (b)11 7 3 10 6 2 9 5 1 (c)........ (d)None of these Ans-> (b) 4.) If there is 4 jobs(j1,j2,j3,j4) and there deadlines (2,4,2,4).Which of the followinf sheduling is not possible. (a)j1 j3 j2 j4 (b)j1 j2 j4 j3 (c)j1 j3 j4 j2 (d)j3 j1 j2 j4 5.) .4 process allocated 8000 bytes of memory according to best fit as follows:- p1 - 2000 p2 - 2000 p3 - 2500 p4 - 1500 p1 and p4 is released.If a process p with 1000 bytes enter where will it be paced (a)After p1 (b)After p3 (c)Cannot be placed (d)....... Ans->(b) 6.) Heap with 10 bytes is present.Then which of the following series is possible 4 options of a series of malloc and free funtions.Don't remeber the choices but easy to get the answer. 7.).All combinational circuits can be implemented by (a)Only NOR (b)Only NAND (c)Only XOR (d)None of these Ans-> (d) 8.) void main() { int a=10,b=11; printf("%d",a+++b); printf("%d",a+++b); } (a.) 22,23 (b.) 23,24 (c.) 21,22 (d.) none Ans->(c) |