April 25, 2013

HCL Sample paper 11


HCL Aptitude Test Nov 26th 2006
1) a) NMI
b) Software interrupts
c) Hardware interrupts
d) Software and hardware interrupt
Ans: b

2) Which of the following is error correction and deduction?
a) Hamming code
b) CRC
c) VRC
d) None
Ans: b

3) When you switch on your computer, which of the following component affect first?
a) Mother board
b) SMPS
c) Peripherals
d) None
Ans : a

4) Which of the following function transports the data?
a) TCP/IP
b) Transport layer
c) TCP
d) None
Ans: c

5) Which of the following does not consists address?
a) IP
b) TCP/IP
c) Network
d) Transport
Ans:a

6) They given like this……. And some conditions?
a) pre order
b) post order
c) In order
d) None
Ans:c

7) Authentication means….
a) Verifying authority
b) Source
c) Destination
d) Request
Ans: a

8) Symorphous is used for
a) Analysis
b) Synchournization
c) Asynchrouns
d) None
Ans: b

9) There are five nodes. With that how many trees we can make?
a) 27
b) 28
c) 30
d) 29
Ans: c (Check the ans not sure)

10) Traverse the given tree using in order, Preorder and Post order traversals.
ABC
DEF
GHI
Given tree:
Ø Inorder : D H B E A F C I G J
Ø Preorder: A B D H E C F G I J
Ø Postorder: H D E B F I J G C A
And some more questions….. I dint remember those questions
Given tree:
Ø Inorder : D H B E A F C I G J
Ø Preorder: A B D H E C F G I J
Ø Postorder: H D E B F I J G C A
And some more questions….. I dint remember those questions



SECTION –II (C language Basics and programming) this section consists of 20 Questions…….. All
are programs only…
1. main()
{
printf("%x",-1<<4);
}
a) fff0
b) fffb
c) ff0
d) none
Ans: a
Explanation:
-1 is internally represented as all 1's. When left shifted four times the least significant 4 bits are filled
with 0's.The %x format
specifier specifies that the integer value be printed as a hexadecimal value.

2. main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
a) e
b) H
c) some address
d) ome garbage value
Ans: b
Explanation:
* is a dereference operator & is a reference operator. They can be applied any number of times
provided it is meaningful. Here
p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again &
references it to an address and * dereferences it to the value H.


3. void main()
{
int i=5;
printf("%d",i++ + ++i);
}
a) 11
b) 12
c) 10
d) output cant be predicted
Ans: d
Explanation: Side effects are involved in the evaluation of i


4. main( )
{
int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}};
printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1);
}
a) 100, 100, 100, 2
b) 101,101,101,2
c) 114,104,102,3
d) none
Ans: c
Explanation:The given array is a 3-D one. It can also be viewed as a 1-D array.
2 4 7 8 3 4 2 2 2 3 3 4
100 102 104 106 108 110 112 114 116 118 120 122
thus, for the first printf statement a, *a, **a give address of first element . since the indirection ***a
gives the value. Hence, the first line of the output.for the second printf a+1 increases in the third
dimension thus points to value at 114, *a+1 increments in second dimension thus points to 104, **a +1
increments the first dimension thus points to 102 and ***a+1 first gets the value at first location and
then increments it by 1. Hence, the output is C is correct answer…


5. main( )
{
static int a[ ] = {0,1,2,3,4};
int *p[ ] = {a,a+1,a+2,a+3,a+4};
int **ptr = p;
ptr++;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
*ptr++;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
*++ptr;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
++*ptr;
printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr);
}
a) 111
222
332
443
b) 111
222
333
344
c) 111
222
333
444
d) None
Ans: b


6. #include
main()
{
const int i=4;
float j;
j = ++i;
printf("%d %f", i,++j);
}
a) 8
b) 5
c) compile error
d) syntax error
Ans: c


7. main()
{
char *p;
int *q;
long *r;
p=q=r=0;
p++;
q++;
r++;
printf("%p...%p...%p",p,q,r);
}
a) 001… 100…0002
b) 0001...0002...0004
c) 001… 002…004
d) none
ans: b


8. main()
{
unsigned int i;
for(i=1;i>-2;i--)
printf("HCL Technologies");
}
a) HCL
b) Technologies
c) HCL Technologies
d) None
Ans: None(Plz Check the answer)


9. main()
{
int a[10];
printf("%d",*a+1-*a+3);
}
a) 4
b) 5
c) 6
d) None
Ans : a


10. main()
{
float f=5,g=10;
enum{i=10,j=20,k=50};
printf("%d\n",++k);
printf("%f\n",f<<2);
printf("%lf\n",f%g);
printf("%lf\n",fmod(f,g));
}
a) Line no 5: Error: Lvalue required
b) Line no 5: Error: Link error
c) Compile error
d) None
Ans: a


11. int swap(int *a,int *b)
{
*a=*a+*b;*b=*a-*b;*a=*a-*b;
}
main()
{
int x=10,y=20;
swap(&x,&y);
printf("x= %d y = %d\n",x,y)
}
a) x=10 y=20
b) x=20 y=10
c) x=30 y=20
d) none
Ans: b


12. main()
{
int i=300;
char *ptr = &i;
*++ptr=2;
printf("%d",i);
}
a) 665
b) 565
c) 556
d) none
Ans: c


13.main()
{
float me=1.1;
double you=1.1;
if(me==you)
printf(”IloveU”);
else
printf(“I Hate U”)
}
a) I love u
b) I hate u
c) floating point error
d) Compile error
Ans: b


14.
enum colors {BLACK,BLUE,GREEN}
main()
{
printf(”%d..%d..%d”,BLACK,BLUE,GREEN);
return(1);
}
a) 1..2..3
b) 0..1..2
c) 2..3..4
d) none
Ans: b
Some more questions given.. I dint remember…. Be prepare all basic concept in C… so that you can
answer very easily…





SECTION –III (Data structures and C++) this section consists of 10 Questions… Each question carry
2 marks… so they deduct ½ mark for wrong answer…..
1) #include
main()
{
char s[]={'a','b','c','\n','c','\0'};
char *p,*str,*str1;
p=&s[3];
str=p;
str1=s;
printf("%d",++*p + ++*str1-32);
}
a)97
b) M
c)76
d) none
Ans: b


2) main( )
{
int a[ ] = {10,20,30,40,50},j,*p;
for(j=0; j<5; j++)
{
printf(“%d” ,*a);
a++;
}
p = a;
for(j=0; j<5; j++)
{
printf(“%d ” ,*p);
p++;
}
}
a) address of array
b) Compile error
c) Lvalue required
d) none
Ans: c


3) struct aaa{
struct aaa *prev;
int i;
struct aaa *next;
};
main()
{
struct aaa abc,def,ghi,jkl;
int x=100;
abc.i=0;abc.prev=&jkl;
abc.next=&def;
def.i=1;def.prev=&abc;def.next=&ghi;
ghi.i=2;ghi.prev=&def;
ghi.next=&jkl;
jkl.i=3;jkl.prev=&ghi;jkl.next=&abc;
x=abc.next->next->prev->next->i;
printf("%d",x);
}
a) 3
b) 2
c) 4
d) 5
Ans: b


4) main(int argc, char **argv)
{
printf("enter the character");
getchar();
sum(argv[1],argv[2]);
}
sum(num1,num2)
int num1,num2;
{
return num1+num2;
}
a) compile error
b) L value required
c) Syntax error
d) None
Ans: a


5)
class Sample
{
public:
int *ptr;
Sample(int i)
{
ptr = new int(i);
}
~Sample()
{
delete ptr;
}
void PrintVal()
{
cout << "The value is " << *ptr;
}
};
void SomeFunc(Sample x)
{ cout << "
Say i
am in someFunc "
<< endl;
} int main()
{
Sample s1= 10;
SomeFunc(s1);
s1.PrintVal();
}
a) say I am in someFunc
b) say I am in someFunc and runtime error
c) say I am in someFunc and null value
d) none
ans: b
and some questions given in DATASTURES… those are based on linked lists only also very big
programs… so you have to do it very careful





SECTION-III (General aptitude+1 passage+Logical) this section consists of 20 questions.. Each
question carry 1 mark…
1) Sandhya and Bhagya is having the total amount of 12000. In that amount bhagya has deducted 3600
as less as sandhya. So what is their shared amount?
a) 2800
b) 3600
c) 4800
d) 9600
Ans : c

2) Six persons have to present at certain meeting. The conditions are,
A present P should present
M present T should present
K present P should present
If A and P present I should be there in meeting
If M and T present D should be absent
If K and P present P should present
Based on this they given some questions… Those are easy only.. you can do it easily…

3) Here they given passage following some questions.. Poetry explaining her experience with HINDI
latest songs… and comparing with old songs… also she is a good singer. Like this they given a big
passage… so read it carefully at a time.. so that u can save your time

4) Dhana and Lavanya started running at same point… But dhana started in anti clock wise direction,
Lavanya started in clockwise direction.. Dhana met lavanya at 900 m . where as lavanya met dhana
at 800 m… so how much distance they covered each other?
a) 1700
b) 900
c) 1800
d) data is insufficient
Ans: d

5) This question is base on Arithmetic mean like algebra… a n+2 = (7+an)/5…. Initially a0= 0…… so
what is the value of a2?
a) 5/2
b) 7/2
c) 7/5
d) none
Ans : c

6) Here they given two statements, based on that they gave some questions
Statement I : I is enough to answer
Statement II: I and II is enough to answer
i) Raja can do a piece of work in 9 days… and govardhan can do a piece of work in 8 days. In how
many days they will complete the work alternatively..
Statement I: They both do in 72/17 days
Statement II : A alone can do 1/9 days
a) I b) I and II c) II d) none

HCL Sample paper 10


HCL TECHNOLOGIES PAPER - 16 OCT 2005 - CHENNAI

1. How many segment registers are there in the 8086 processor?
a) 4 b) 6 c) 8 d) none
Ans: a

2. What is the addressing mode of this instruction MOV AL, [BX];
a) direct addressing mode
b) register indirect addressing mode
ANS: b I am not sure of it.

3. What is the type of file system used in the CD ROM?
a) VFAT B)
4) About CPU I think but answer is DMA.

5) If we double the clock speed, then?
a) It increases the speed of the processor b) It increases the speed of the system bus c) both of
the above D) None

6) Data recovery is done in which layer?
a) physical b) datalink c) network d) transport

7) What is thrashing?
ANS: swapping in and out the pages frequently from memory.

8) By using 3 nodes how many trees can be formed?
ANS:5
9) They give one tree, and ask the post order traversal for that tree?
ANS:C
10) Page cannibalation is?
ANS:C

Aptitude section:
1) They give one scenario and ask questions on that. that is easy. Those are 5 questions.
2) They ask 2 questions in English, I didn't answer those ones. They are - Find the odd one?
3) They give 2 questions on missing digits. They r matrix type, I didn't remember the questions,
But I know answers.
for first one 8. For second one 28 is the answer.
4)Two persons start walking from the same place in opposite directions. After walking for 4
mts, both of them take the left and walk for another 3 mts. Then
what is the distance b/w them?
Ans:10 mt.

5)One person start from his home towards college which is 53 km far away. Another person
started from college towards home after an hour. the speed of first one is 4kmph and the second
one is 3 kmph. Then, what is the distance from home to their meeting point?
AND:21 km.

6)3 machines can complete the work in 4,5, and 6 hours respectively. due to power failures they
did the work alternatively. Then what is time taken to complete the work?
ANS:9/20

7)Two persons take the pair of dies and throws them. If 12 appers first one wins, If two
consecutives 7 s appear then second one wins. What is the probability to
win first one in the game?
a)6/15 b)3/13 c)2/13

8)Two questions on figures .They give five figures ,and change them sequentially, u have to
find 6 th one. They give 4 choices.

9)one more Q. on number sequence.

C Programming:
1) what is name of the operator in passing variable no. of arguments to function?
ANS: Ellipsis

2) main()
{
printf("%d%d"size of ("Hcl
technologies"),strlen("HCL Technologies"));
}
a)16 16 b)16 17 c)17 17 d)17 16

3) main()
{ char arr[]={ '
a','b','\n',....}
some more instructions;
}
ANS:77

4) main()
{ int arr[]={0,1,2,3,4)
int *a={arr, arr+1,arr+2,...}
int **p=a;
p++;
some instructions:
}
ANS:1 1 1

5)They give one Q on 3-d array?
ANS:4

6)one Question on ++ and && operators.
ANS:1,0,0

7)one question on logical operators
Ans:1 00 1

8)one question on the return value of scanf function ?
ANS:1

ANALYSIS OF PROGRAMS:
1) For one Q. they make the constructor in the base class as virtual and give the big program.
So, for that one ANSWER is NONE, (d).
2) In one Q. They give the prototype of the function that structure as argument .But, Structure is
defined after that and they give the program.
ANS: ERROR

3) for one Q. They give the answers as 4444 ,7777, 9999.But, the answer is 6666. So, Answer is
None (d).







HCL Sample paper 9


Section A 
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 OST, terminal emulation is done in
(a) sessions layer
(b) application layer
(c) presentation layer
(d) transport layer
Ans: (b)

3. For a  25MHz processor , what is the time taken by the instruction which needs 3 clock cycles,
(a)120 nano secs
(b)120 micro secs
(c)75 nano secs
(d)75 micro secs

4. For 1 MB memory, the  number of address lines required,
(a)11
(b)16
(c)22
(d) 24
Ans. (b)

5. Semaphore is used for
(a) synchronization
(b) dead-lock avoidence
(c) box
(d) none
Ans. (a)

6. Which holds true for the following statement
     class c: public A, public B
a) 2 member in class A, B should not have same name
b) 2 member in class A, C should not have same name
c) both
d) none
Ans. (a)

7. Question related to java

8. OLE is used in
a) inter connection in unix
b) interconnection in WINDOWS
c) interconnection in WINDOWS NT

9. Convert a given HEX number to OCTAL

10. Macros and function are related in what aspect?
(a)recursion
(b)varying no of arguments
(c)hypochecking
(d)type declaration

11.Preproconia.. does not do which one of the following
(a) macro
(b) conditional compliclation
(c) in type checking
(d) including load file
Ans. (c)

12. Piggy backing is a technique for
a) Flow control
b) Sequence
c) Acknowledgement
d) retransmition
Ans. (c)

13. In signed magnitude notation what is the minimum value that can be represented with 8 bits
(a) -128
(b) -255
(c) -127
(d) 0

14. There is an employer table with key fields as employer number data
      in every n'th row are needed for a simple following queries will get required results.
(a) select A employee number from employee A , where exists from employee B where A employee no. >= B
     employee having (count(*) mod n)=0
(b) select employee number from employe A, employe B where A employe number>=B employ number
    group by employee number having(count(*) mod n=0 )
(c) both (a) & (b)
(d) none of the above

15. Type duplicates of a row in a table customer with non uniform key field customer number you can see
a) delete from costomer where customer number exists( select distinct customer number from customer having count )
b) delete customer a where customer number in b rowid
c) delete customer a where custermor number in( select customer number from customer a, customer b )
d) none of the above

Section B

1. Given the following statement
     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

2. Find the output for the following C program
main
{int x,j,k;
j=k=6;x=2;
x=j*k;
printf("%d", x);

3. Find the output for the following C program
fn f(x)
{ if(x<=0)
return;
else f(x-1)+x;
}

4. Find the output for the following C program
i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{k+=j<10?4:3;
}
printf("%d", k);
Ans. k=4

5. Find the output for the following C program
int i =10
main()
{int i =20,n;
for(n=0;n<=i;)
{int i=10;
i++;
}
printf("%d", i);
Ans. i=20

6. Find the output for the following C program
int x=5;
y= x&y
 
7.Find the output for the following C program
Y=10;
if( Y++>9 && Y++!=10 && Y++>10)
{printf("%d", Y);
else
printf("%d", Y);
Ans. 13

8. Find the output for the following C program
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)

9. What is the sizeof(long int)
(a) 4 bytes
(b) 2 bytes
(c) compiler dependent
(d) 8 bytes

10. Which of the function operator cannot be over loaded
(a)  <=
(b) ?:
(c) ==
(d) *

11. Find the output for the following C program
main()
{int x=2,y=6,z=6;
x=y==z;
printf(%d",x)
}

Section C (Programming Skills)
Answer the questions based on the following program
STRUCT DOUBLELIST
{ DOUBLE CLINKED
INT DET; LIST VOID
STRUCT PREVIOUS; (BE GIVEN AND A PROCEDURE TO DELETE)
STRUCT NEW; (AN ELEMENT WILL BE GIVEN)
}
DELETE(STRUCT NODE)
{NODE-PREV-NEXT NODE-NEXT;
NODE-NEXT-PREV NODE-PREV;
IF(NODE==HEAD)
NODE
}
Q. In what case the prev was
(a) All cases
(b) It does not work for the last element
(c) It does not for the first element
(d) None of these

Answer the questions based on the following program
VOID FUNCTION(INT KK)
{KK+=20;
}
VOID FUNCTION (INT K)
INT MM,N=&M
KN = K
KN+-=10;
}

Q. What is the output of the following program
main()
{ int var=25,varp;
varp=&var;
varp p = 10;
fnc(varp)
printf("%d%d,var,varp);
}
(a) 20,55
(b) 35,35
(c) 25,25
(d)55,55

Section D
1. a=2, b=3, c=6
    Find the value of c/(a+b)-(a+b)/c

2. What does the hexanumber E78 in radix 7.
(a) 12455
(b) 14153
(c) 14256
(d) 13541
(e) 131112
Ans. (d)

3. 10 : 4 seconds :: ? : 6 minutes
Ans. 900

4. Q is not equal to zero and k = (Q x n - s)/2.What is  n?
(a) (2 x k + s)/Q
(b) (2 x s x k)/Q
(c) (2 x k - s)/Q
(d) (2 x k + s x Q)/Q
(e) (k + s)/Q

5. From the following statements determing the order of ranking
  • M has double the amount as D
  • Y has 3 rupess more than half the amount of D
Ans. Data insuffiecient

Questions 6 - 10 are to be answered on the following data
  • A causes B or C, but not both
  • F occurs only if B occurs
  • D occurs if B or C occurs
  • E occurs only if C occurs
  • J occurs only if E or F occurs
  • D causes G,H or both
  • H occurs if E occurs
  • G occurs if F occurs
6. If A occurs which of the following must occurs
I.  F and G
II. E and H
III. D
(a) I only
(b) II only
(c) III only
(d) I,II, & III
(e) I & II (or) II & III but not both
Ans. (e)

7. If B occurs which must occur
(a) D
(b) D and G
(c) G and H
(d) F and G
(e) J
Ans. (a)

8. If J occurs which must have occured
(a) E
(b) either B or C
(c) both E & F
(d) B
(e) both B & C
Ans. (b)

9. Which may occurs as a result of cause not mentioned
I. D
II. A
III. F
(a) I only
(b) II only
(c) I & II
(d) II & III
(e) I,II & III
Ans. (c)
10. E occurs which one cannot occurs
(a) A
(b) F
(c) D
(d) C
(e) J
Ans. (b)

HCL Sample paper 8


Section-I

1). Piggy backing is a technique for
a) Flow control b) sequence c) Acknowledgement d) retransmission
ans:   c    piggy backing

2). The layer in the OST model handles terminal emulation
a) Session b) application c) presentation d) transport
ans: b  application

3)  ans:  a                     odd numbers of errors
4)Q.     In signed magnitude notation what is the minimum value that can be represented with 8 bits         a) -128  b) -255  c) -127  d) 0
5) c                  20
6) a                  120
7) b                  synchronize the access
8) a                  system call
9) b                  the operating system
10) a                177333
11) d   used as a network layer protocall in network and windows system
12) b                has to be unique in the sub network

13)Q. there is an employer table with key feilds as employer no. data in every
 n'th row are needed for a simple following queries will get required results.
  a) select A employe no. from employe A , where exists from employe B
where A employe no. >= B employe having (count(*) mod n)=0
  b) select employe no. from employe A, employe B where
A employe no. >= B employ no.   grouply employe no. having (count(*) mod n=0 )
  c) both a& b
  d)none of the above

14)Q. type duplicates of a row in a table customer with non uniform key feild
customer no. you can see
a) delete from costomer where customer no. exists
( select distinct customer no. from customer having count )
b) delete customer a  where customer no. in
(select customer  b where custermer no. equal to b custemor no. ) and a rowid >
b rowid
c) delete customer a where custermor no. in
( select customer no. from customer a, customer b )
d) none of the above

15)  c               Volatile modifier


SECTION-II


1)   ans: recursion

2) long int size
   a) 4 bytes  b) 2 bytes  c) compiler dependent  d) 8 bytes
ans: compiler dependent

3) x=2,y=6,z=6
x=y==z;
printf(%d",x)    ?

4) if(x>2)?3:4              7)  ans: c  6  ( q’tion on enum )
14)  c : class A,B and C can have member  functions with same name.
15)  ans: d       none of the above

SECTION-III

1) ans: b                       It  does not work when rp is the last element in the linked list
2) ans: a           always             3) ans: b                       13        4) ans: b       16
5) ans: d       55,55      6) ans: c               5,10,10,3
8) ans:d                       4          9) ans: c                       5     10)ans: c    semicolon missing

SECTION-IV

 2. M > D > Y        ans: (a)
 6. 10 in 4 seconds,
     ? in 6 minutes         = 10x6x60/4  = 900    ans: (a)
 7. a=2, b=4, c=5
      (a+b)/c - c/(a+b) = 11/30 (ans).
 8. 100(100000000+100000000)/10000 = 2x1000000 (ans).
 9. what does the hexanumber E78 in radix 7.
    (a) 12455  (b) 14153  (c) 14256  (d) 13541  (e) 131112   ans: (d)
 10. Q is not equal to zero   and  k = (Q x n - s)/2    find  n?
    (a) (2 x k + s)/Q  (b) (2 x s x k)/Q   (c) (2 x k - s)/Q
    (d) (2 x k + s x Q)/Q   (e) (k + s)/Q

  (from GRE book page no:411)
    data:
     A causes B or C, but not both
     F occurs only if B occurs
     D occurs if B or C occurs
     E occurs only if C occurs
     J occurs only if E or F occurs
     D causes G,H or both
     H occurs if E occurs
     G occurs if F occurs

NOTE: check following answers.

 11. If A occurs which of the following must occurs
        I. F & G                II. E  and  H               III. D
    (a) I only   (b) II only  (c) III only  (d) I,II, & III
    (e) I & II (or) II & III but not both             ans: (e)

 12. If B occurs which must occur
    (a)  D   (b) D and G  (c) G and H  (d) F and G  (e) J   ans: (a)

 13. If J occurs which must have occured
    (a) E  (b) either B or C  (c) both E & F  (d) B  (e) both B & C  ans: (b)

 14. which may occurs as a result of cause not mentioned
    (1) D   (2) A   (3) F
    (a) 1 only  (b) 2 only  (c) 1 & 2  (d) 2 & 3  (e) 1,2,3    ans: (c)

 15. E occurs which one cannot occurs
    (a) A   (b) F   (c) D   (d) C   (e) J              ans: (b)

 11 to 15:-    -----------  e , a , b , c , b ---------------

Below are in order:

 16.  to  20.  answers:   

e
a
c
a
e

HCL SOFTWARE PAPER

NOTE :  Please check answers once again.

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          b)appl..           c)presenta...    d)transport     ans: b
3....... 25MHz processor , what is the time taken by the
instruction which needs 3 clock cycles,
a)120 nano secs             b)120 micro secs       c)75 nano secs  d)75 micro secs


4. For 1 MBmemory no of address lines required,
a)11 b)16  c)22   d) 24
ans: 16

5. Semafore is used for
a) synchronization     b) dead-lock avoidence   c)box     d) none
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. question related to java
8. OLE is used in
a)inter connection in unix     b)interconnection in WINDOWS
c)interconnection in WINDOWS NT

9.No given in HEX ---- write it in OCTAL
10.macros and function are related in what aspect?
a)recursion    b)varying no of arguments  c)hypochecking     d)type declaration

11.preproconia.. does not do one of the following
a)macro ......  b)conditional compliclation  c)in type checking  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
2.main
{
int x,j,k;
j=k=6;x=2;                                               ans x=1
x=j*k;
printf("%d", x);

3. fn f(x)                  
{ if(x<=0)
  return;                                                 ans  fn(5) ....?
else f(x-1)+x;
}
4. i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{          k+=j<10?4:3;               }
printf("%d", k);            ans  k=4
5.  int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
    i++;
}
printf("%d", i);                                          ans i=20

6. int x=5;
    y= x&y
( MULTIPLE CHOICE QS)                          ans :  c

7.  Y=10;
 if( Y++>9 && Y++!=10 && Y++>10)
printf("........ Y);
else   printf(""....  )                                                       ans : 13

8. 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              d) ........                                    ans  :  a

9. if x is even, then
(x%2)=0
x &1 !=1
x! ( some stuff is there)
a)only two are correct             b) three are correct                  c),        d)  ....
ans  :   all are correct

10.  which of the function operator cannot be over loaded
a) <=                b)?:                c)==                 d)*
ans:  b and d

 SECTION.C  (PRG SKILLS)
 (1)      STRUCT DOUBLELIST
      {                              DOUBLE CLINKED
        INT DET;                     LIST VOID
        STRUCT  PREVIOUS;            BE GIVEN AND A PROCEDURE TO DELETE
        STRUCT NEW;                  AN ELEMENT WILL BE GIVEN
      } 
     DELETE(STRUCT NODE)
     {
       NODE-PREV-NEXT  NODE-NEXT;
       NODE-NEXT-PREV  NODE-PREV;
       IF(NODE==HEAD)
       NODE
    }
     IN WHAT CASE THE PREV WAS
     (A) ALL CASES
     (B) IT  DOES NOT WORK FOR LAST ELEMENT
     (C) IT DOES NOT WORK FOR-----
(2)     SIMILAR TYPE QUESTION
     ANS: ALL DON'T WORK FOR NON NULL VALUE

(3) 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=?
(2) no.rep in hexadecimal, write it in radiv 7
(3) A B C D E
         * 4
   ----------   find E   ANS: 13
   E D C B A
  ------------
(4) GRE-MODEL TEST-1, SECTION-6(19-22)
(5) M HAS DOUBLE AMOUNT AS D, Y HAS RS. 3 MORE THAN HALF OF AMOUNT OF D
    THE ORDERING  A,B,C        M C D C Y
         ANS:DATA INSUFFICIENT    D C M C Y
(6)IN 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  ANS; C(VERIFY)
(D)-----ETC
(7) P,Q,R,S,T,U  -SECURING GRANT;TWO TOURIST PARTIES AND THEN
TWO SECURITY GAURDS SHOULD GO WITH EACH PARTY
    _________________________________________________________________
    P AND R-ARE ENEMIES,            Q DOES NOT GO SOUTH
    P&S-ARE WILLING TO BE TOGETHER
 ___________________________________________________________________                                                     
 THE TWO PARTIES MAY GO SOUTH&NORTH RESPECTIVELY
 AT ONE POINT EACH MAY PASS EACH OTHER THEN GAURDS CAN EXCHANGE
 6 Q BASED ON THIS
 (8)pq-r/s  =2 what is q inference  a,n&d
 (a) a can do n units of work in strs,a&b can do n units of work
 in 2 hrs in how many hrs n units of work ans:3 hr 30 min   
 p = (2s+r)/q
                                     ____________

main()
{
  int var=25,varp;
  varp=&var;
  varp p = 10;
  fnc(varp)
  printf("%d%d,var,varp);
}
 (a) 20,55(b) 35,35(c) 25,25(d)55,55

 [ c++,c,dbms  interview]
 [fundamentals]
  this is new paper
______________________________________________________________
                             application -software
                              ____________________
part-1:
28-questions
(5)ingless  ans:RDMS
(1)bit program-ans d
(2)c ans
(3)+ 0 ans
(4)00p--ans linking
(5)------
(6)-------
(9)25--45 even no.  ans--10
(10)  >10    <100   ---ans=n+9