Texas Paper
1: given an expression tree and asked us to write the in fix of that expression

four choices

2:

global variables in different files are

a:at compiletime

b) loading time

c) linking time

d)execution time

3)size of(int)

a) always 2 bytes

b) depends on compiler that is being used

c) always 32 bits

d) can't tell

4)which one will over flow given two programs

2

prog 1: prog2:

main() main()

{ {

int fact; int fact=0

long int x; for(i=1;i<=n;i++)

fact=factoral(x); fact=fact*i;

} }

int factorial(long int x)

{

if(x>1) return(x*factorial(x-1);

}

a) program 1;

b) program 2;

c) both 1 &2

d) none

}

5) variables of fuction call are allocated in

a) registers and stack

b) registers and heap

c) stack and heap

d)

6)

avg and worst case time of sorted binary tree

7) data structure used for proority queue

a) linked list b) double linkedd list c)array d) tree

8)

main(){

char str[5]="hello";

if(str==NULL) printf("string null");

else printf("string not null");

}

what is out put of the program?

a) string is null b) string is not null c) error in program d) it executes but print nothing

9)there are 0ne 5 pipe line and another 12 pipe line sates are there and flushed time taken to execute five instructions

a) 10,17

b) 9,16

c)25,144

d)

10)

for hashing which is best on terms of buckets

a)100 b)50 c)21 d)32 ans 32

11)

void f(int value){

for (i=0;i<16;i++){

if(value &0x8000>>1) printf("1")

else printf("0");

}

}

what is printed?

a) bineray value of argument b)bcd value c) hex value d) octal value

12)

void f(int *p){

static val=100;

val=&p;

}

main(){

int a=10;

printf("%d ",a);

f(&a);

printf("%d ",a);

}

what will be out put?

a)10,10

13)

struck a{

int x;

float y;

char c[10];

}

union b{

int x;

float y;

char c[10];

}

which is true?

a) size of(a)!=sizeof(b);

b)

c)

d)

14)

# define f(a,b) a+b

#defiune g(c,d) c*d

find valueof f(4,g(5,6))

a)26 b)51 c) d)

15)

find avg access time of cache

a)tc*h+(1-h)*tm b)tcH+tmH

c) d) tc is time to access cache tm is time to access when miss occure

16)

main()

{

char a[10]="hello";

strcpy(a,'\0');

printf("%s",a);

}

out put of the program?

a) string is null b) string is not null c) program error d)

17)

simplyfy k map

1 x x 0

1 x 0 1

18)

int f(int a)

{

a=+b;

//some stuff

}

main()

{

x=fn(a);

y=&fn;

what are x & y types

a) x is int y is pointer to afunction which takes integer value

19) char a[5][15];

int b[5][15];

address of a 0x1000 and b is 0x2000 find address of a[3][4] and b[3][4]

assume char is 8 bits and int is 32 bits

a) b) c) d)

there are 20 questions all in techinical paper and 36 questions in appititude test

in appititude thay have given all diagrams and asked to find what comes next

thay are quite easy and i hope if u practice r.s aggraval u can do it easily

for tecnical thay have given 1 hr for 20 questions and for not technical thay have given only 40 min and 36 questions

this is the paper i have right now

for TI aptitude test consist of all pictorial questions. ie in

each question he will give 8 diagrams and ask to find the

9'th diagram in that sequence.

You go through RS Agarwal. These aptitude questins are

very easy. Just pratice them. In RS Agarwal gothrough

SERIES chapter. It is suffient. There are 35 aptitude

questions. First 25 are very easy. Do these questions

in just 15 or 20 minutes. Because last questions are

very touch.

TECHNICAL TEST:

-------------------------

1)3 flipflops are connected so that after 0 to 5 count occured

next number is zero. So what is the counter?

Ans: mod 6 counter

2)simplication of some boolean expression which is simple.

Boolean Expression is A+A'B.

Ans:A+B

3)Given inorder sequence and preorder sequence and asked to

find out postorder sequence.

4)Some question on value of a static variable.

5) Given an interger in binary form,find the number of ones in

that number without counting each bit.(This questin is not

multiple choice question. This question carries more

marks. So please take care for this question.)

6) 1-way set associative memory is called-----

a)direct b)something c)1-way set associative 4)something

Ans: c

7)Fastest IPC mechanism is

a)shared memory b)pipes c)named pipes d)semaphores

Ans:c

8)Some page references are given. You are asked to implement

it with Least Frequently Used algorithm.

9)Some diagram is given.

Iam describinmg the diagram. A 2*1 MUX is given. The inputs

are A,B. Output is C. C and A are tied together. What is

the diagram.?

Ans:Latch.

**************************************************************

This paper is for Electrical & Electronics students. There is

separate test for computer Science Students. There are 20

questions.

1)Some circuit is given. Iam describing the circuit.

A resistor R & a capacitor C are connected in parallel.

To this circuit another circuit which is having a capacitor

of capacity 2C & an impedence Z, is connected in series.

You are asked to find out the value of Z? Note that 2C & Z

are connected in series.

a)Z=2C

b)Z=2L

c)Z=L/2

d)Z=2R

2)Some circuit which consist of only resistors R is given.

This is a repetative circuit. U have to find the effctive

resistance of the entire circuit.

A)Rin=R

B)Rin=(5+sqrt(3))/7

C)Rin=(19+sqrt(3))/8

D)None.

3)Two wave forms are given. You are asked to write the cirsuit

to get B(second wave form) from A(first wave form).

4)#define SUM(a,b) a+b

main()

{

a=2;

b=3;

x=SUM(a,b)*2;

printf("x=%d\n",x);

}

Ans:8.

5)number(int i)

{

number++;

printf("%d\n",number);

}

main()

{

static int i=0;

number(i);

}

Ans: I don't know.

6)Some circuit is given. I can't describe the circuit. There are

3 resistors,3 capacitors & one inverter.. The question is

What is the value of the frequency such that the circuit oscillates.

A)f=RC

B)f=sqrt(3)/(Pi*R*C)

C)f=1/(Pi*R*C)

D)something

Ans:I don't know the answer.

7)Question on flipflop. So gothrough all flipflops.

8)There are 5 questions on Nmos & Pmos circuits.

**************************************************************

This Paper is for Computer Science Students. THis paper is

very easy. You can definitely do it in one hour.

**************************************************************

(1) The fastest memory is

(i) DRAM, (ii) ROM, (iii) SRAM, (iv) Main memory

Ans : SRAM

(2) Programing exceptions are

(i) Asynchronous, (ii) Synchronous, (iii) None

Ans : Asynchronous

(3) DSP which architecture is used

(i) MIMD, (ii) SIMD, (iii) Nueman, (iv) Harvard Architecture

Ans : Harvard Architecture

(4) C prog. for searching for an element in linked list

(5) main()

{

unsigned char i;

int sum;

for(i=0; i<300; i++)

sum+ = i;

printf("\nSum = %d\n", sum);

}

Ans : infinite loop

(6) void fn(int *p)

{

static int val = 100;

p = &val;

}

main()

{

int i=10;

printf("i=%d\n", i);

fn(&i);

printf("i=%d\n", i);

}

Ans : i=10 i=10

(7) int a[10[15];

char b[10[15];

(a) location g a[3][4], if base location g a[0][0] is ox1000

(b) location g b[3][4], if base location g b[0][0] is ox2000

int taken 32 bits and char taken 8 bits.

Ans : (a) ox10C4 (b) ox2031

(8) Implement OR gate function with 2*1 MUX

Ans : A ___________

--------|2*1 MUX |

B | |--------o/p

--------| |

| -----------

|_______|C

B=C

(9) Implement 4*1 MUX with 2*1 MUXES

(10) Swapping without using a temporary variables. (2 methods)

(i) x = x+y;

y = x-y;

x = x-y;

(ii) x = x^y;

y = x^y;

x = x^y;

(11) Count no of 1's in a word without using bit by bit.

(This question carries more marks. It is not a multiple choice

question.)

(12) Code 1 :

for(i=0; i<1000; i++)

for(j=0; j<100; j++)

x = y;

Code 2 :

for(i=0; i<100; i++)

for(j=0; j<1000; j++)

x = y;

Which code will execute faster

(i) Code 1 and Code 2 are of same speed,

(ii) Code 1,

(iii) Code 2,

(iv) None.

Ans : Code 2

(13) main()

{

int a[10] = {1, 2, 3, ...., 10}, i, x=10, temp;

for(i=0; i<x; i++){

temp = a[i];

a[i] = a[x-i-1];

a[x-i-1] = temp;

}

(i) All contents of array a are reversed

(ii) Only some portions are altered

(iii) Remains same

(iv) None

Ans : (iii)

(14) An array is stored in row major order. The memory capacity is

30 MB. And in unix system demand paging is used. Which one will

give more page faults?

#define V_L_I 10000

int i, j, array[V_L_I][V_L_I];

Code 1 :

array[i][j] = 1;

Code 1 :

for(j=0; j<V_L_I; j++)

for(i=0; i<V_L_I; i++)

array[i][j] = 1;

Ans : Code 2

(15) In C which parameter passing technique is used?

(i) call by value,

(ii) call by reference,

(iii) both

Ans : call by value

(16) A circuit is given with 2 exclusive OR gates whose boolean

expression will be y = '(AB) + AB

(' indicates bar)

(17) main()

{

int i = 1;

fork();

fork();

printf("\ni = %d\n", i+1);

}

Ans : 4 printfs will occur and i = 2

(18) Compute the complexity of Binary search.

Ans : O(lg n) ( Answer in detail. This is not a multiple choice question.

It carries more marks.)

(19) Write expression for the tree graph :

Ans : ((a-b) + c*d)/x

(20) # define MAX(a, b) a>b ? a:b

main()

{

int m, n;

m = 3 + MAX(2, 3);

n = 2 * MAX(3, 2);

printf("m = %d, n = %d\n", m, n)

}

Ans : m=2, n=3