Creativo - the topper's choice

www.creativo.co.in ( Placement papers of all companies are here )

Monday, May 01, 2006

Sasken

The questions were like this.------------------------------The text consists of two parts1) C test2) CSE01 TestDuration: 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 givend) which of the following is illegal for the program?main(){char const *p='p';}1)p++ 2) *p++ 3)(*p)++ 4) alle) what is the output of the following programvoid 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 giveng) 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 questionsIn this section there was question from LD-gates, JK flip flop, sampling rate and few otherthen 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


1. IN BINARY TREE IF PARENT HAS INDEX i then its left and right child occurs at: ans (a) 2i and 2i+1 2. 1 prog is given n scope is asked ans (b) static scope (probably)
3. complete graph has ans (b) n vertices and n(n-1)/2 edges
4. page fault is said 2 occur when: 4 choices r given probably (c)
5. probability that a frame is recieved with an error is P in a system. probability that the first frame to b recieved with an error is after the first N frame is (a) (1-P)*(p raised to power N) (b) [(1-P) raised to power (N-1)] (c) p raised to power N (d) combination of N taken P at a time
6. statistical time division multiplexing provides: (a) statistics of tdm signal (b) provision to multiplex analog signal (c) improved time sharing efficiency (d) static routing b/w nodes ans (b) check
7. main advantage of AMI coding is (a) easy clock recovery (b) easy carrier recovery (c) reduced bandwidth req (d) reduced error rate
8. recursive-descent parser is a (a) top-down parser (b) bottom-up parser (c) shift-reduce parser (d) LR parser
9. min. no. of NAND gates reqd to implement a 2 i/p x-nor gate (a) 2 (b) 3 (c) 4 (d) 5
10. mandatory feature of a real time OS is: (a) priority based preemptive scheduling (b) high time slicing granularity (c) run to completion (d) none of the above


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 - Semaphores12) About Computability (eg:- finding infinite loop), Complexity of algorithms13) 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.


The text consists of two parts1) C test2) CSE01 TestDuration: 1hr--------------------------------------------------------------- freshersworld.com1) 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;} freshersworld.commain(){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 givend) which of the following is illegal for the program?
main(){char const *p='p';} freshersworld.com1)p++ 2) *p++ 3)(*p)++ 4) all
e) what is the output of the following programvoid 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}** 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 questionsIn this section there was question from LD-gates, JK flip flop, sampling rate and few otherthen there was a few from OS


1) C test2) CSE01 TestDuration: 1hr---------------------------------------------------------1) C test -10 questions- Some questions were as followsI 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 givend) which of the following is illegal for the program? main() { char const *p='p'; } 1)p++ 2) *p++ 3)(*p)++ 4) alle) 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 giveng) 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 - i dont remember the questions
C Test------1. What is the output of the Program? main() { int a[10]={1,2,3,4,5,6,7,8,9,10}; int *p=a; int *q=&a[9]; printf("%d",q-p+1); } Ans: 102. main() { int i=6; int *p=&i; free(p); printf("%d",i); } Options: a. No Error. b. Free can't be used for p, c. Compiler Error. d. In printf we should use *p instead of i. Ans: A3. What is the output of the Program? main() { int i=5; i=!i>3; printf("%d",i); } Ans: 0 4. What is the output of the Program? main() { int a[10]; 3[a]=10; printf("%d",*(a+3)); } Ans: 105. int (*p[10]) (); In above declaration what type of variable is P? Ans: P is array of pointers that each points to a function that takes no arguments and returns an int.6. What is the output of the Program? struct emp { int a=25; char b[20]="tgk"; }; main { emp e; e.a=2; strcpy(e.b,"tellapalli"); printf("%d %s",e.a,e.b); } Ans: Compile Error.7. What is the output of the Program? main() { int a=5; const int *p=&a; *p=200; printf("%d",*p); } Ans: Compile Error.8. What is the output of the Program? #define SQ(x) x*x main() { int a=SQ(2+1); printf("%d",a); } Ans: 5.9. What is the output of the Program? main() { struct t { int i; } a,*p=&a; p->i=10; printf("%d",(*p).i); } Ans: 1010. This program will be Compiled? [Yes/No] zzz.c file ---------- /* This is zzz.c file*/ /*printf("tellapalli");*/ abc.c file ---------- main() { #include"zzz.c" printf("Tellapalli"); } Ans: Yes


C questions ------------1.Consider the following declaration:-
char const *p = 'd';
Which of the following is not a permissible operation(a) *p++(b) ++p(c) (*p)++(d) All
2.What is the output of the following code:-
void print_arr(float **p){printf(" 0 %f 1 %f 2 %f\n",p[0][0],p[0][1],p[0][2]);}
void main(){float arr[2][3] = {{0,1,2},{3,4,5}};float **fl_arr;fl_arr = (float *)arr;print_arr(fl_arr);fl_arr++;print_arr(fl_arr);}
(a)(d)segmentation fault
3.What is the output of the following code:-
#define putchar (c) printf("%c",c)void main(){char s='c';putchar (s);}
(a) c(b) 99(c) Compilation error(d) Execution error
4.What is the output of the following code:-
void main(){printf("%d",printf("ABC\\"));}
(a) ABC\\(b) 1(c) ABC\4(d) ABC\3
5.What is the output of the following code:-
int compute(int n){if(n>0) { n=compute(n-3)+compute(n-1); return(n); }return(1);}
void main(){printf("%d",compute(5));}
(a) 6(b) 9(c) 12(d) 13
6.What is the output of the following code:-
void main(){int i;for(i=0;i<3;i++){int i="100;i--;printf(" p="&a[3];printf(" p=" (int*)((char" i="0;i<100;i++)" j="0;j<10;j++)" j="0;j<10;j++)" i="0;i<100;i++)" y =" zThen(a)...(b)y0) { print(n-1); printf("%d",n);//println(n) in Pascal version. print(n-1); }}(a)3(b)7(c)15(d)31
4.Maximum number of nodes in a tree with n levels.(a)2^(n-1)(b)(2^n)-1(c)2^(n-1) - 1
5.Complete graphwith n nodes have(a)n-1 edges(b)n(n-1)/2
6.If d is the degree of a node in a graph and n isnumber of vertices then number of edges in that graphis(a)Edi^n(b)0.25Edi(c)0.5Edi
7.A grammar was given and 4 strings was given and theone which was not possible was to be chosen.
8.A problem related to ethernet in which a stationsending a frame is of p probablity.There are mstations to send pckts.4 option was given.It was amathematical kind of question related to probablity.
9.Which of the following layer in the OSI model doeserror handling(a)Data link(b)Network(c)Transport(d) a & c
10.A network problem in which Data rate,Propagationdelay,and distance was given and it was to find howmany packets will be in the line.Choices where(a)5000(b)Not possible to find with given data(c)1000
Answers(Not very sure about all the answers)--------------------------------------------1.(d)2.(b)3.(c)4.(b)6.(c)9.(d)10.(a)
Interview [For CS students] ---------There is Tech as well as HR interview. Tech interviewis the important one. Tech interview questions ------------------------They will ask about the project.They will ask generalquestions about it and most probably will not go intothe implementation part of it.So one must have ageneral idea about the project done.
Interview is mainly based on Data Structures.Somequestions are as follows:- - What is a tree,its application,order forinsertion,deletion and traversal with worst caseanalysis. - What is a graph,its application. - Height of a tree - Balanced tree and how to balance a tree - Minimum Spanning Tree - Dijikstra's, Prim algorithms - Define a structure for a linked list. - Binary search and its analysis - Heap sort and its analysis - What is a heap and its application - Cache and its working - Memory(IO mapped) - Recursive fns and types, its adv and disadv. - Compiler(grammar)
*****C debugging questions like
(1)What is the problem with the following code
int * f(int a){int i;i=a;return(&i);}Ans-> We can't return address of auto variable as itis allocation is made in stack which is deallocatedwhen the function returns.
(2)a.h b.c c.c d.cint i=0 #include"a.h" #include"a.h" extern inti;void main{.....} b.o c.o d.o Compilation Phase
Linked to get exe. Will there be any problem in any phase.If yes thenwhere and what?In linking phase as there will be multiple declarationof i.
*****You will be told to write some code like
(1)To find string length by using recursive function.(2)To find fibonaci series by using recursivefunction.(3)To write code for malloc so that allocation may bemade fastly.(4)Write a fn prototype which return a pointer whichpoints to an array of 10 ints.
HR Interview ------------ - Introduce yourself - Why should we take you - What you know about Sasken and etc


FIRST PART: 10 QUESTION ON C--(All ques had 4 option)1) WHICH OF THE BELOW IS FASLE: A) auto var are destroyed on cal; b) global var retain values thru the life of program.(i dont remember other option)
2) give outputvoid main(){char *str = "hello\0";int i;i=fun(str);printf("%d",i);}int fun(char *str){int i;for(i=0;*str!=NULL;str++){i++;}return(i);}
3)for(i=0;i<100;i++){for(j=0;j<50;j++){a[i][j]=1;}} j="0;j<100;j++){for(i="0;i<50;i++){a[i][j]="1;}}" i="1;j="2;k="3;fun((i++,&i),(++j,&j),(--k,&k));}" s =" Program %d" i="5;printf(s,i);}What" 3y="12.What">>
The above conclusion is invalid beacuse :-(U got to select one option)
i dont remember the rest , but it ws easiest part.
PART 3: COMPUTER SCIENCE( Student with ECE,ES,ECT,will get Electronics Paper)
This part seemed a bit difficult to me(As I am from MCA).10 question in all.All question had 4 option.i dont remember the option.
1)What type is recursive parser?
2) What is advantage of AMI coding?
3)A network has error rate of p.What is probability that the frame after Nth frame is having error?
4)When does invalid page fault occurs?
5)There was a ques on automatic variable..i dont remeber.
6)What is an essential feature of RTOS?
7)A program and its output was given.You were asked whether the variable hadstatic or local or global or dynamic scope.
8)Let the position of root in a binary tree be 'i'.So the left and right child will be?(Ans:2i and 2i+1)
I am sorry i dont remember the rest of question.
For interview get ur fundas ok , dont bluff, and say what u know and what u dont.i was asked 1) 16 bit division in 8085,2)Digital logic(gates , devices(TTL) , multiplexer(draw multiplexer with NAND gate)3) question on my project in C++, JAVA.

c and c++;-------------------------------------- 1. char buffer[]="susan"; a) individual characters can be changed. b) buffer[7] is not accesible. c)none of the above. which of the above is TRUE;
ans : a)
2.#include#includevoid main(){ int ctr=0; clrscr(); switch(ctr) { case 0: ctr++; case 1: ctr++;
default : ctr++; }; printf("%d",ctr); getch();}
What is the output of the code.i) ctr=2;ii) ctr=3;iii) ctr=1;iv) compiler error;

Ans : ii)
3.#include#includevoid main(){ void fun(int,int); int i ,j; i=2,j=3; fun(i++,j++); printf("%d%d",i,j); getch();}void fun(int i,int j){ i++,j++;
}
Question : what is the output ?
i)i=2,j=3;ii)i=3,j=4;iii)i=5,j=6;iv) compiler error.

Ans : ii)
4) #include #include void main() { int a[20]; clrscr(); *a=(int*)malloc(sizeof(a)); printf("%d",sizeof(a)); getch(); }
ans :40 5)#include#includevoid main(){ char *s="susan"; clrscr(); printf(s); getch();}
i) compiler error;ii) s;iii) susan;iv) 5;
Ans: iii)
6) i) const * int p; ii) int const *p; iii) const int *p;
Question : which of the following is same.
a)i) and ii) b)i),ii) and iii) c)ii) and iii) d)none of the above.
7) i) (*ptr)++; ii) *ptr+=1; iii) *ptr++;
Question: which of the folowing is same.
a)i) and ii) b)i),ii) and iii) c)ii) and iii) d)none of the above.
8) a)for(int i=0; i<50 ;i++) for( int j=0; j<100; j++) a[i][j]=100;
b)for(int i=0; i<100 ;i++) for( int j=0; j<50; j++) a[j][i]=100;
Question : Which of the above 2 codes executes quickly.
i) a) is faster than b) ii) b) is fater than a) iii) both a) and b) executes for same time. iv) depends upon the compiler and the hardware used.
Ans: " I think iii)" (check it out)
9)
fun( int x, int y) { x =3; y =2; }
main() { int i; fun( i,i); printf("%d",i); }
Question :if the value is 2 then the calling mechanism is
a. Call by name b. Call by refernce c. Call by value
ans : call by reference


q.1 if phase of different frequency components of signal vary linearly then they all reach destination with delay1) delay also vary linerly.2) no change in delay,3)
q.2 what is the relation in dbm and db?1) same2) dbm is 10 times db3) db is 10 times dbm4) db is relative measure and dbm is absolute measure.
q.3 difference in PSK and QPSK a. slower sample rateb. greater sample ratec. slower bit rated. greater bit rate.
q.4 what is the main problem with power line communicationa. high audio signal generationb. seperation of modulating and career signalc. (something) low pass filtering
q.5 a signal is to be transmitted 1000km long distance sending 10 mbps . if signal consists of 1000 bits/package and takes 5 microsecs. to transmit then how much data is to be send such that line gets fully filled.a. 100b. 500cd.1000
q.6 if a process is wide sense stationary then a. it's probability density function is also wssb. power spectral density is wssc. it's mean constant and auto correlation function depends only on time diff. t1-t2.d.
q.7 for intelligent sound signal transmission a. low pass filter of 1.8khz is to be used.b. hpf of 1.8khzc. d.
q.8 if a 32 bit number in fractional form is to be converted into float then it is multiplied witha. 2^31b. 1/(2^31 - 1)c. 2^31 -1d.
q.9 if signal is sampled at 8 khz and the signal of 1 khz is transmitted then
********************************************************************************second part had 10 ques of c programming . some of them r here.
q.1 char const *p='p' then which of below is truea.**P = (this question u can get from freshersworld sample paper)
q.2 recursive function count(n){ if count<=1 then result = 1; else result = count(n-3) + count(n-1) } for count(6) ans is:a. 3b. 6 c. 9d. 12
q.3 for(i=0;i<=50;i++) for(j=0;j<=100;j++)
for(j=0;j<=100;j++) for(i=0;i<=50;i++) for this type of loop which one is fastera. sameb. firstc. second d. depends on s/w and h/w
q.4 #define putchar(%f,c) int c='d'; putchar(c);what is the output?a. ,b. some numbersc. compiler error d. segmentation error
q.5 file a test() { int a; } file b void main(void) { int b; b= test(); } what is the outputa. ab. bc. not compiled,errord. compiles sucessfully,but give linker error
sorry other ques. i dont remember but they all were asked from pointers. study C pointers thoroughly
************************************************************************************last section comprised of 10 aptitude questions. q.1 if 2q.2 in parallelogram what values of angles r possible i. 90,90,90,90 ii. 70,130,70,130 iii. 40,70,150,130 a. i and ii onlyb,c,d,e : combinations
q.3 if x+y=z is given what can be inferred from it0i. xq.4 if B is 8 miles in east from city A, c at 16 in north from B, D 16 miles in east of C, E at 12 in north of D then what is the distance b/t a and e.a. 10 b. 20c. 30 d. 40e. 50
q.5 in a library for each single novell there r 2 science book and for each science book there r 7 economics books then the ratio of economics to science to novell isa. 1:2:14b. 2:1:7c. 14:2:1d.e.
q.6 ira is taller than sam, harold is shorter than gene, elliot is taller than haroldsam and harold is of same height. thenwhich one is true.a.sam is shorter than harold b. elliot is taller than genec. ira is taller than elliotd. elliot is shorter than gene e. harold is shorter than ira
q.7 if a(n) is to be entered following the rule [ a(n)^2 - 1 ] then what r the next three enteries.a. 0,-1,0 b. 2,3,4c. 1,2,3d. 0,-1,2e. 0,-1,1

0 Comments:

Post a Comment

<< Home