Document

New Text Document

You must be logged in to download this document
Reviews
Shared by: Honey Singh
Categories
Tags
Stats
views:
71
rating:
not rated
reviews:
0
posted:
11/12/2007
language:
English
pages:
0
hi vijay, for the paper of HCL infosystem which u have uploaded i am mailing some of the answers of the questions which were left un answered . i have checked them on my own but if there is some discrepency in any of them then let me know. Moreever there are some more additional questions which were there in HCl infosystem paper which was conducted in NIT,Kurukshetra. Section 1 __________ 1.which of the following involves context switch, a) system call b) priviliged instruction c) floating poitnt exception d)all the above e)none of the above ans: a 2.In OSI, terminal emulation is done in a)semion d)transport b)application c)presentation ans: b 3.25MHz processor , what is the time taken by the needs 3 clock cycles, a)120 nano secs c)75 nano secs b)120 micro secs d)75 micro secs instruction which 4. For 1 MB a)11 memory no of address lines required, b)16 c)22 d) 24 ans: 16 5. Semafore is used for a) synchronization c)box d) none b) dead-lock avoidence ans : a 6. class c: public A, public B a) 2 member in class A,B shouldnot have same name b) 2 member in class A,C c) both d) none " '' '' '' ans : a 7. OLE is used in a)inter connection in unix b)interconnection in WINDOWS c)interconnection in WINDOWS NT ans : b 8.macros and function are related in what aspect? a)recursion c)hypochecking b)varying no of arguments d)type declaration ans:a 9.preproconia.. does not do one of the following a)macro ...... c)in type checking b)conditional complication d)including load file ans: c SECTION B __________ 1.enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above ans:c 2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x); ans x=36 3. fn f(x) { if(x<=0) return; else f(x-1)+x; } ans fn(5) ....15 4. i=20,k=0; for(j=1;j9 && Y++!=10 && Y++>10) printf("........ Y); else printf("".... ) ans : 13 7. f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error ans : a 8. if x is even, then (x%2)=0 x &1 !=1 x! ( some stuff is there) a)only two are correct tip: in this i would like to mention that if it is x&-1 then it will print value of x else if it is x&&-1 b) three are correct c)all are correct ans : all are correct then it will print 1. 9 which of the function operator cannot be over loaded a) <= b)?: c)== d)* ans: b and d SECTION.C (PRG SKILLS) Q STRUCT DOUBLELIST { INT DET; STRUCT PREVIOUS; DOUBLE CLINKED LIST VOID BE GIVEN AND A PROCEDURE TO DELETE AN ELEMENT WILL BE GIVEN STRUCT NEW; } DELETE(STRUCT NODE) { NODE-PREV-NEXT NODE-NEXT-PREV IF(NODE==HEAD) NODE } IN WHAT CASE THE PREV WAS (A) ALL CASES (B) IT NODE-NEXT; NODE-PREV; DOES NOT WORK FOR LAST ELEMENT (C) IT DOES NOT WORK FOR----- Q VOID { FUNCTION(INT KK) KK+=20; } VOID FUNCTION (INT K) INT MM,N=&M KN = K KN+-=10; } SECTION D --------------------------- (1) a=2,b=3,c=6 c/(a+b)-(a+b)/c=? ans: 1 or 0.36667 (2) no. rep in hexadecimal, write it in radix 7 (3) A B C D E * 4 ---------E D C B A -----------find E ANS: 13 (4) STASTIC MEN CAUSE MORE ACCIDENTS THEN ONE CONCLUSION (A) MEN DRIVE MORE THAN ONCE (B) STASTICS GIVE WRONG INFORMATION (C) WOMEN ARE CAUTION THAN ME (D)-----ETC ANS; C(VERIFY) Application -Software part-1: Q. The following variable is available in file1.c static int average_float; all the functions in the file1.c can access the variable ans : extern int x; Q. Another Problem with # define TRUE 0 some code while(TRUE) { some code } ______________________________________________________________ main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } int x; main() { int x=0; { int x=10; x++; change_value(x); x++; Modify_value(); printf("First output: %d\n",x); } x++; change_value(x); printf("Second Output : %d\n",x); Modify_value(); printf("Third Output : %d\n",x); } Modify_value() { return (x+=10); } change_value() { return(x+=1); } --------------------------------------------------------------------------- main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } ----------------------------------------------------------------------- main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } ---------------------------------------------------------------------- main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); } -------------------------------------------------------------------- #define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } ---------------------------------------------------------------------- main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } --------------------------------------------------------------------- #include main() { char s1[]="Ramco"; char s2[]="Systems"; s1=s2; printf("%s",s1); } #include main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1,"Ramco"); strcpy(p2,"Systems"); strcat(p1,p2); printf("%s",p1); }

Shared by: Honey Singh
About
Honey is a zealous web and graphics designer (currently working with media redefined ) having a creative and devouring gumption with an experience of over 3 years in Interactive Designing , Blogging and Web technologies.
Other docs by Honey Singh
What Mr.Buffett learned from Graham
Views: 1260  |  Downloads: 134
Warren Buffett_27s Invisible Empire
Views: 1099  |  Downloads: 90
Under Warren Buffett_27s Big Top
Views: 717  |  Downloads: 46
The Warren Buffett You Don_27t Know
Views: 977  |  Downloads: 103
The Best Advice I ever Got
Views: 6415  |  Downloads: 372
9 investing secrets of Warren Buffett[2]
Views: 1096  |  Downloads: 147
UNIX[3]
Views: 871  |  Downloads: 41
Thinking in java 2nd edition
Views: 1246  |  Downloads: 68
network programming
Views: 696  |  Downloads: 37
Kevs-php-mysql[1]
Views: 10329  |  Downloads: 64
Googles Backdoor
Views: 436  |  Downloads: 19
Google Hacking 101
Views: 13922  |  Downloads: 332
Google Hackers Guide
Views: 8435  |  Downloads: 259
Google Anatomy
Views: 1543  |  Downloads: 194
Beej_27s Guide to Network Programming
Views: 496  |  Downloads: 19
Related docs
Text Document
Views: 0  |  Downloads: 0
Text Document
Views: 1  |  Downloads: 0
text document
Views: 0  |  Downloads: 0
Text
Views: 4  |  Downloads: 0
[TEXT]
Views: 0  |  Downloads: 0
(text
Views: 3  |  Downloads: 0
[TEXT]
Views: 4  |  Downloads: 0
Text
Views: 4  |  Downloads: 0
Text
Views: 6  |  Downloads: 0
(text)
Views: 14  |  Downloads: 0
text
Views: 2  |  Downloads: 0
dhaba
Views: 3  |  Downloads: 0