**Intergraph Placement Papers**

**C skills :**

1. 5-2-3*5-2 will give 18 if

(a)- is left associative,* has precedence over –

(b) – is right associative,* has precedence over –

(c) – is right associative,- has precedence over *

(d)- is left associative,- has precedence over *

2. printf(“%f”, 9/5);

prints

(a) 1.8,

(b) 1.0,

(c) 2.0,

(d) none

.

3. if (a=7)

printf(” a is 7 “);

else

printf(“a is not 7”);

prints

(a) a is 7,

(b) a is not 7,

(c) nothing,

(d) garbage.

4. if (a>b)

if(b>c)

s1;

else s2;

s2 will be executed if

(a) a<= b,

(b) b>c,

(c) b<=c and a<=b,

(d) a>b and b<=c.

5. printf(“%d”, sizeof(“”));

prints

(a) error

(b)0

(c) garbage

(d) 1.

6. value of automatic variable that is declared but not intialized

will be

(a) 0,

(b) -1,

(c) unpredictable,

(d) none,

7. int v=3, *pv=&v;

printf(” %d %d “, v,*pv);

output will be

(a) error

(b) 3 address of v,

(c) 3 3

(d) none.

8. declaration

enum cities{bethlehem,jericho,nazareth=1,jerusalem}

assian value 1 to

(a) bethlehem

(b) nazareth

(c)bethlehem & nazareth

(d)jericho & nazareth

9. find(int x,int y)

{ return ((x<=”” font=””>

call find(a,find(a,b)) use to find

(a) maximum of a,b

(b) minimum of a,b

(c) positive difference of a,b

(d) sum of a,b

10. integer needs 2bytes , maximum value of an unsigned integer is

(a) { 2 power 16 } -1

(b) {2 power 15}-1

(c) {2 power16}

(d) {2 power 15}

11.y is of integer type then expression

3*(y-8)/9 and (y-8)/9*3 yields same value if

(a)must yields same value

(b)must yields different value

(c)may or may not yields same value

(d) none of the above

12. 5-2-3*5-2 will give 18 if

(a)- is left associative,* has precedence over –

(b) – is right associative,* has precedence over –

(c) – is right associative,- has precedence over *

(d)- is left associative,- has precedence over *

13. printf(“%f”, 9/5);

prints

(a) 1.8,

(b) 1.0,

(c) 2.0,

(d) none

14 if (a=7)

printf(” a is 7 “);

else

printf(“a is not 7”);

prints

(a) a is 7,

(b) a is not 7,

(c) nothing,

(d) garbage.

14 if (a>b)

if(b>c)

s1;

else s2;

s2 will be executed if

(a) a<= b,

(b) b>c,

(c) b<=c and a<=b,

(d) a>b and b<=c.

16main()

{

inc(); ,inc(); , inc();

}

inc()

{ static int x;

printf(“%d”, ++x);

}

prints

(a) 012,

(b) 123,

(c) 3 consecutive unprectiable numbers

(d) 111.

17preprocessing is done

(a) either before or at begining of compilation process

(b) after compilation before execution

(c) after loading

(d) none of the above

18 find(int x,int y)

{ return ((x<=”” font=””>

call find(a,find(a,b)) use to find

(a) maximum of a,b

(b) minimum of a,b

(c) positive difference of a,b

(d) sum of a,b

19 needs 2bytes , maximum value of an unsigned integer is

(a) { 2 power 16 } -1

(b) {2 power 15}-1

(c) {2 power16}

(d) {2 power 15}

20y is of integer type then expression

3*(y-8)/9 and (y-8)/9*3 yields same value if

(a)must yields same value

(b)must yields different value

(c)may or may not yields same value

(d) none of the above

20 printf(“%f”, 9/5);

prints

(a) 1.8,

(b) 1.0,

(c) 2.0,

(d) none

21(a=7)

printf(” a is 7 “);

else

printf(“a is not 7”);

prints

(a) a is 7,

(b) a is not 7,

(c) nothing,

(d) garbage.

22 if (a>b)

if(b>c)

s1;

else s2;

s2 will be executed if

(a) a<= b,

(b) b>c,

(c) b<=c and a<=b,

(d) a>b and b<=c.

23main()

{

inc(); ,inc(); , inc();

}

inc()

{ static int x;

printf(“%d”, ++x);

}

prints

(a) 012,

(b) 123,

(c) 3 consecutive unprectable numbers

(d) 111.

24preprocessing is done

(a) either before or at beginning of compilation process

(b) after compilation before execution

(c) after loading

(d) none of the above.

22 Max number of nodes in a binary tree with height 3 is 20 : Ans: False

**23**10,20,30,40,50,60 : give the order when put in a queue and in a stack

**Ans :** Queue : 10,20,30,40,50,60

: 60,50,40,30,20,10

24Debugging is the process of finding

logical and runtime errors

25 trace the error:

void main(){

int &a;

/* some other stuff here */

}

**Ans:** syntax error

26.ex:define max 10

main()

{

int a,b;

int *p,*q;

a=10;b=19;

p=&(a+b);

q=&max;

} Q a)error in p=&(a+b) b)error in p=&max c)error in both d) no error

Important suggestions:

1.average preparation is enough to qualify for interview. time is enough.

2.they are particular about academic background .

3.interview is only on personal details.no question on technical subjects

4.they may change paper sets also.

5.in outside recruitment they are asking more questions on CAD but not in campus. in iitd they interviewed 5 students out of 21. selected 1, waiting list 1.

6.cut off cgpa:7.5

Optimize the below 1,2,3,4 questions for time:

27

int i;

if i=0 then i:=1;

if i=1 then i:=0;

28

int i;

if i=0 then i:=1;

if i=1 then i:=0;

(given that i can take only two values (1,0))

29

int i;

if i=0 then i:=1;

else if i=1 then i:=0;

(given that i can take only two values (1,0))

30

int m,j,i,n;

for i:=1 to n do

m:=m+j*n

31 Expand the following

a) ISDN

b) CASE

c) CSMA/CD

d) OOPS

e) MIMD

32 In the following questions, answer A,B,C,D depending on when the errors are detected?

A if no error is detected

B if semantic and syntactic checking

C if during Code generation & Symbol allocation

D run time

a) Array overbound

b) Undeclared identifier

c) stack underflow

d) Accessing an illegal memory location

33How many page faults will occur for below sequence of pages when LRU page replacement algorithm is used (The memory can only have 3pages):

1,2,3,4,2,1,5,2,4 (something like that)

34 If a CPU has 20 address lines but MMU does’nt use two of them. OS occupies 20K. No virtual memory is supported. What is the maximum memory available for a user program?

35 For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?

36 Understand the funda of incrementing a variable using val++ and ++val. Some programs are given for error correction.

37 Learn datagram. (Computer networks)

38Which of the following can be zero? (only one)

a) swap space

b) physical memory

c) virtual memory

39 What is a must for multitasking?

a) Process preemption

b) Paging

c) Virtual memory

d) None of the above

38A question on call by value,

call by name,

call by reference.

f(x,y,z)

{

y := y+1;

z := z+x;

}

main()

{

int a,b;

a := 2

b := 2;

f(a+b,a,a);

print a;

}

what is the value of a printed for three different calls in main.

40 Using the following instructions and two registers, A&B.

find out A XOR B and put the result in A

PUSH <reg>

POP <reg>

NOR These instructions operates with A & B and puts the result in

AND A

(question basically to get XOR in terms of NOR and AND)

41True/False questions:

1) The page size should be the power of 2.

2)

17)

int i=0;

int j=0;

loop:

if(i = 0)

i++;

i++;

j++;

if(j<= 25)

goto loop

xxx:

42Who handles page faults?

a) OS

b) MMU

c) Hardware logic

d) etc etc….

43For which of following is it not possible to write an algorithm.

a) To find out 1026th prime number

b) To write program for NP-complete problem

c) To write program which generates true Random numbers.

etc…

44what is the essential requirement for an real-time systems

a) pre-emption

b) virtual memory

c) paging etc…