Sasken Placement Question Papers

APTITUDE

1. Two people were walking in opposite directions.both of them walked 6 miles forward then
took right and walked 8 miles.how far is each from starting positions?

a) 14 miles and 14 miles
b) 10 miles 10 miles
c) 6 miles 6 miles

2. a person has certain number of cows and birds.they have 172 eyes and 344 legs.how many
cows and birds does he have?

3.a person has 14 red socks and 14 white socks in a drawer.what is the minimum number of
socks that he should take to get a correct pair?

4.when a number is multiplied by 13,it will become greater to 105 by an amt with which it is lesser
to105 by now.what is the number

5.when asked what the time is, a person answered that the amount of time left is 1/5 of the time
already completed.what is the time?

6.when I become as old as my father is now, I will be 5 times the age of my son.and my son will
be 8 yrs older than what I am now.father+my age=100.how old is my son now?

7.two peoples on cycles are traveling at 10 miles / hour.when they reach a distance of 50 miles, a
housefly lands on the first cyclist and then flies to the other and so on…at a speed of 16
miles/hour.what is the distance covered by fly before cyclist meet?

8.my successor's father is my father's son. and i don't have any brothers or sons..who is my
successor?
a)nephew
b)niece
c)daughter
d)myself

COMPUTER SCIENCE

1. which of these checks for structural errors of a language
a)lexical analyser
b)parser
c)intermediate code
d)code optimisation

2. threads in the same process share the same
a)data section
b)stack
c)registers
d) thread id

3.the depth of a binary tree...
a)nlogn(base 2)
b) n*n
c)n

4.a program computing log(n) accepts 1000 inputs its execution time is 110 ms...when it doubles
n to 2000 inputs..it becomes 120.....and what will be for 4000
a)130
b)140
c)150

5.algorithm to find the balancing of paranthesis was given and output had to be obtaines...using
stacks...easy yaar....

6.which of the followin is non preemptive
fcfs
round robin
shortest job first

7.problem to find the avg waitin time of sjf..given the burst times of each process

8.which of the follwing may be implemented using a stack
parenthesis matchin
parsing
local variables stored in runtime
all the above

9.which of the foll data structures can be randomly accessed givin loc
1.linked kist implemented using array
2.singly linked list
3.double linked list
4.both single and double linked list

APTITUDE

1. The hours remaining in a day is one-fifth of the hours passed in
the day. What is the time?

2. My successor is my uncles only brothers son who is his only kid.
(some what like this)

3. A and B starts from the same point and moves in opposite
direction for 8 miles and 6 miles respectively. After that A turns
right and moves for another 6 miles. B also turns right and moves 8
miles. What are their respective distance from the starting point?
10,10

4. In a pet shop there are 120 eyes and 172 legs. How many birds
and puppies are included in these?

5. Two cyclists are moving towards each other at 10 miles/hour.
They are now 50 miles apart. At this instance a fly starts from one
cyclist and move towards other and moves to and fro till the two
cyclist meet each other. If the fly is moving at 15 miles/hour, what is
the total distance covered by the fly? 50 80 100

6. Guru's draw has 14 blue socks and 14 black socks. How many socks
must be taken to get a pair of socks of the same color? 14 15
13 16


C – SECTION

1. Find output ………….
Int *ptr=&const;
………… ((((( ans:error)))))

2. Find output ………..
Function(i=10);
…………… (((((ans:error)))))

3. #define SWAP(x,y) t=x;x=y;y=t;
main()
{ int x=5,y=6;
if (x>y)
SWAP(x,y);
Printf(“x=%d y=%d\n”,x,y);
}
((( note that the function SWAPis not within
braces))))
4. sum(int x)
{int t;
if(x<=1) return (1);
t=sum(x-3)+sum(x-1);
return (t);
}

if 6 is passed to the function, what is the value returned to the
calling function.
(((((((ANS===== 9)))))))))
[ans:don't remember the actual _expression.if the _expression is the
same the ans was nine]


5. what is int (*ptr)[]()?

6. Main()
{int a[]={0,2,4,6,8};
int *ptr;
ptr=a;
printf(“%d”, *((char *) ptr+4));
}
find output
8 2 4 6 (((((( ANS==== 4)))))))

7. which takes the same memory space regardless of the type of
operating system?
Char* char int float
8. main()
{ int I=3;
while(I--)
{int I=100;
I--;
Printf(“%d”, I);
}
}
find output.
100 99 98 99 98 97 99 99 99 error ((((( ANS== 99
99 99)))

9. main()
{char ch;
for(ch='0';ch<=255;ch++)
printf(“%c”, ch);
}
((((((([ans : infinite loop))))))
10. some program using variable b which was not initialized so
((((ans error))))

 

Sasken Placement Papers and Sample Papers

 

Off Campus Written Test conducted in 3 at Bangalore
The test comprises of 2 sections:
1. Technical ( C ) & Technical Subject- 60 mins, 60 questions
2. Logical Reasoning.. - 30 mins,17 questions....

==> Questions in C were mostly from "pointers in c" and "test ur C skills" by Yeshwant Kanetkar... C questions based on command line arguments, data structure ( BST, tree traversals). All the questions were like " what is the output of the following program segment" and in many questions 3rd and 4th choices were (c) compilation error and (d) compilation, warning, runtime error.... Heard they are asking abt- ptr, string, arr, preprocessor, data structures etc.. C test was pretty ok pass by value, pass by reference etc. questions were asked The general test was pretty tough, they ask u fourier transforms,harmonics,Barkhuasen criterion,virtual memory,Whether FIFO is better than LRU etc. 4 questions were from fourier transforms the duration was 60 mins and no negative marking

C basics 10 questions ,very easy.Given a program and asked the output-type questons.from pointers 3-4 questions are there. 2)reg subject:very very easy:some from digital(on nand gates. Jk flip flop),from Information theory and coding,some from Micro processors.

In Logical Reasoning all the 17 questions were paragraphs (argument) of 5 to 6 sentences...five sentences (choices) will be given below and questions were asked like " which of the five if true will weaken or supports the argument above .." :- R. S. Agrawal LR is sufficient

SASKEN PAPER HELD ON 9th AUG at 2:30pm
--------------------------------------------------------------

The questions were like this.
------------------------------
The text consists of two parts
1) C test
2) CSE01 Test
Duration: 1hr
---------------------------------------------------------------
1) C test -10 questions- Some questions were as follows, remember only a few.
a) What is the parameter passing mechanism to Macros Called?
b) void func(int x,int y)
{
x=3;
y=2;
}
main()
{
int i;
func(i,i);
print(i);
}
If the output must be 2 what is the parameter passing mechanism called?
c) which of the following code will swap the two numbers? -3 choices was given
d) which of the following is illegal for the program?
main()
{
char const *p='p';
}
1)p++ 2) *p++ 3)(*p)++ 4) all
e) what is the output of the following program
void print(int ** arr)
{
print("0 %f, 1 %f, 2 %f ",arr[0][0],arr[0][1],arr[0][2]);
}
main()
{
int a[][]={ {1,2,3},
{4,5,6}
}
int ** arr=a;
print(arr);
arr++;
print(arr);
}
f) which of the following code swaps the two numbers.
- 4 choices were given
g) if the string " this is a " is present in the code of a function such as 'void func(void)' where
will the variable stored in the memory.
a) in the stack b) heap c) code or text segment as per implementation d) created when func is called, stored in function stack space and destroyed as it goes out .

2) CSE01-15 questions
In this section there was question from LD-gates, JK flip flop, sampling rate and few other
then there was a few from OS - don't remember the questions.


INTERVIEW

In the interview, they asked about Stacks, Queues, Linked lists, Binary Trees.

Few questions I remember are:

1) If u have a linked list library, how do u design stack and queue using it; write pseudocode.

2) What are static variables and functions?

3) Write code in C to count the number of 1s in a character (1byte).

4) What is pre-order, post-order, in-order; write code to print post-order.

5) Can u construct a binary tree given its inorder and postorder details. Is it neccessary or sufficient to construct tree. Asked an example to do in both ways.

6) If recursion is not used to print post order, what other data structure u use

(ans: Stack).

7)Can u use stack always in place of recursion?

(ans: Yes)

8) What are meta characters?

9) Write a piece of code to insert a node in a linked list.

10) About malloc.

11) About Operating System - Semaphores

12) About Computability (eg:- finding infinite loop), Complexity of algorithms

13) What does compiler and assembler do?

They asked grep command in Linux. How do u search '\n', using grep, in a file.

They may ask some other commands if u say u r familiar and recently been using linux.

About Networks? OSI reference model.

what does transport layer do?

TCP belongs to which layer?

IP belongs to which layer?

Where is error correction done?

What is a connection oriented/ connection less transmission?

What is meant by reliable transmission protocol? why is it called so?

What is flow control and where it is done?

About ur project?

Asked me expalin about the project in brief.

If u don't know anything, say it sincerely. U cannot bluff them. I too spoke to them sincerely.

They were cool. U need not get tensed. They won't attack you. Just they want to know ur hold about the subject.

Next Paper

NOTE : Answer May Not be Accurate So Get An Idea of Questions.

What is the value of X after this execution

x = 0;

begin

parbegin

y = x;

x = x+1;

parend

parbegin

z =x;

x = z+1;

parend

end

a:1

b:0

c:2

d:1 or 2

2. Comparision of LRU and FIFO

a. FIFO IS always better

b. FIFO is always worst

c. FIFO is sometimes better

d. NOthing can be said.

ANS :D

3. How many minimum no of NAND GATES ARE required for construction of X-OR gate

6 7 5 8

ANS : 5 (but the correct answer is 4 ) if 4 is present that is correct answer otherwise 5

4.

If each counter has time delay of 15 n sec. Then what is the max time to change the state of 4 bit

synchronus counter

a. 60

b.15

c. 120

d. none

ans : 15

5. There is ADC of freequency 1 MHz. How much time it will take to convert a message stream of 6 bit

ans : 6 Micro Sec

6.

What is Baukshna's criteria for sustaining freequency.

some fk is given that( Iam not clear)

fk > 1

fk <1

fk =0

none

7.

which of the following is wrong:

ans : WCW is a context free language.where w is word formed by sequence of alphabets.

8.

find odd man out

LISP -Functional language

PROLOG - logic programming

C - imperative

ans : c- imperative. Iam not sure ask ur brother.

Fourier analysis 4 questions.

C

How macros are called

a. Call by name

b. Call by refernce

c. Call by value

ans : call by name.

2. fun( int x, int y){

x =3;

y =2;

}

main(){

int i;

fun( i,i);

printf("%d",i);

}

if the value is 2 then the calling mechanism

a. Call by name

b. Call by refernce

c. Call by value

ans : call by reference

3.fun(int i){

static int j =0;

x = x+j; j++

return ;

}

main(){

int x = 2;

I had not remembered the question exactly. but the essence is J will retain the value between successive function calls.

4.

cout << 3 != 2 << 1;

Syntax error.

5.main(){

int z=10,x=6,y=7;

( z ? x:y) =8;

}

ans : the statement does nothing. all values are same.

6. "This is a sting.."

It is string in a function. Where it will be stored.

a. stack

b.global heap

c. Data ro text segment.

d. none

c. Data or Text segment

7. One question i doent remember that Double pointer is given

for that my answer is : Segmentation error

8.fun( int x, int y){

int temp;

temp =x;

x =y;

y = temp;

}

main(){

int i =3,j =4;

fun(i,j);

printf("%d,%d",i,j);

}

ans : 3 4 (that means the values doesnot change)

}

}

) C test -10 questions- Some questions were as follows

I remember only a few.

a) What is the parameter passing mechanism to Macros Called?

b) void func(int x,int y)

{

x=3;

y=2;

}

main()

{

int i;

func(i,i);

print(i);

}

If the output must be 2 what is the parameter passing mechanism called?

c) which of the following code will swap the two numbers? -3 choices was given

d) which of the following is illegal for the program?

main()

{

char const *p='p';

}

1)p++ 2) *p++ 3)(*p)++ 4) all

e) what is the output of the following program

void print(int ** arr)

{

print("0 %f, 1 %f, 2 %f ",arr[0][0],arr[0][1],arr[0][2]);

}

main()

{

int a[][]={ {1,2,3},

{4,5,6}

}

int ** arr=a;

print(arr);

arr++;

print(arr);

}

f) which of the following code swapps the two,numbers.

- 4 choices were given

g) if the string " this is a " is present in the code of a function such as 'void func(void)' where

will the variable stored in the memory.

a) in the stack b) heap c) code or text segment as per implementation d) created when

func is called, stored in function stack space and destroyed as it goes out .