Showing posts with label Kenaxa. Show all posts
Showing posts with label Kenaxa. Show all posts

Saturday, June 7, 2008

Paper 2

1. What are the key differences between C & C++.

2. How is the struct functionality different in C and in C++.

3. What is the difference between the following

a. i=i+1;
b. ++i;

ANS: ++i is a single instruction while in i=i+1, first i+1 is computed and
then assigned.

4. What is the difference between the two files.

file1.c

# include...........

int i;

void main()
{

..........
}

file2.c

# include

static int i;

void main()
{
.....
}

ANS: While in this case for both the programs... the scope and lifetime of
variable 'i' is throughout the program..... the value of 'i' is not.
For eg. if 'i=2' in the file1.c, any other program accessing this
variable from outside will still see the value of i as 2.
Whereas in File2.c if the variable 'i' is accessed from any other
program its value will always be seen as 0

Reason: For static variables their values are active only within the
COMPILE AREA of where it is declared or in the program where it is declared.

4. Explain the OSI layer and TCP/IP layer and their differences.

5. Explain the difference in memory management in Windows and Linux if there
are any.

6. What are the differences between C++ in windows and C++ in Linux.

7. Explain some api's used in Networking (in LINUX and WINDOWS)

8. What is exception handling and how is it different from error
handling...... Why is exception handling used instead of error handling in
some cases and vice versa.

9. What is Hashing in Datastructures and why is it used. What the criteris
for Hashing and explain some of them.

10. What are the criterias to be considered for Searching algorithms.

ANS: The size of the list and whether it is sorted.(these two are apparently
most important.... and that is the answer they expect)

11. What is the key aspect of Object Oriented Programming

ANS: DATA ABSTRACTION (I personally felt "data encapsulation"...... but
apparently the former mentioned was and is correct)

12. Explain sliding window protocol.

13. What is the SELECT() API in networking.


1.difference between C / C++

2.Explanation of OOP principles
-Data Abstraction.
-Data Encapsulation
-Inheritence
-Polymorphism
-Dynamic Binding.
-Reduction of Errors.

3.What is a Friend Function ? Explain with an Example.

4.Is the following code an Example of Dynamic Binding Explain?

class Base
{
Public:
virtual Bool Dosomething()
------
------
------
};

class Derived1: public Base
{
Public:
Bool Dosomething();
-----------
-----------
-----------
};

class Derived2: public Base
{
Public:
Bool Dosomething();
-----------
-----------
-----------
};

void main()
{
Derived1 derived1;
Derived2 derived2;

::process(derived1);
::process(derived2);
}

::Process(Base& Object)
{
Object.Dosomething();
}

Answer: In the processfunction above the downcasting is done while passing
parameters and in the function body upcasting is done so
object.dosomething() will be dynamic binding ( i am unable to explain the
answer in clear terms....but the line of thinking is something like
that....)

5.What will happen if in the above code in the base class the keyword
virtual is removed?

Answer: IF virtual is removed from the function declaration. when the
process function is called it calls the Dosomething function of the
Baseclass itself rather than the derived classes.

6.What is a circular queue? Why is it better than a normal queue? and Give
some practical Examples of usage of circular queue

Usage:
Scheduling Processes&Resources (esp in Operating Systems.)
used as a circular buffer especially in Embedded Systems(because memory
is a constraint).

7.What is Hashing? Explain the procedure to obtain a hashing table.

8.Give a brief presentation of your 8th Semester Project.

i have joined this wonderfull group recently.and i thank all

i have information regarding the test in kshema technologies

i have written the test for kshema technologies
whoever are going to write written test of that company,dont panic

the test is easy to get thru

it consists of english,aptitude,and some c program segments thats all and its a simple paper .duration of test -1hr.and there will be 60 questions,out of which to qualify u need to get 60 % that is 36 questions

verbal ,depends on your ability

Paper 1

part A:

There r few coins on the table and two persons has to draw some coins

from the table.

But maximum no of coins a person can take are only 6.

the person who take last coin considered as loser and other as winner.



and there r 5 q's on the above data like

1.If there r 16 coins on the table now and A has to draw now,How many

coins so that he will win the game



a)2 b)3 c)4 d)5



2.If B has stolen some coins from table with out konwledge of A and B

has to draw now then how many has to draw to win



3.If the rule has been changed so that the player who take last coin

will win and it is A's turn to draw the coin how many he has to draw



Like the above quesitons another two 4,5 r given



Part B:

There is Family with 3 children Names r given.(A,B,C)

A is the eldest,C is the youngest,

c's age is more than 2'years,

Product of their ages is 1400,The sum of their ages is equal to their

neibhour's age.

and thier age is less than 45.C is younger than neibhour's daughter.If

daughter's age is given we cannot tell their ages.



5 q's r given.

6.A's age

a)20 b)28 c)35 d)...

7.B's age

a)10 b)15 c)18 d)....

8.C's age

a)5 b)7 c)2 d)...

9.Neighbors age

a)33 b)45 c)38 d)...

10.Daughter's age .....



Part C:

5 freinds 3 boys and 2 girls going to picnic start at different

locations and their eating habits r different and they take 5 different

magazines with them.



7 conditions r given & we have match the correct answers for 5

q's(11-15)



Part D:

some one stolen some toffees from a box.4 friends made fallowing

statements

A:"B stole the Toffees"

B:"A stolen"

c:"B lies when he say's I stole them"

D:I dont know



16)Question is who is thief?



Part E

Another passage with 4 questions Given easy one (17-20)



Mathes



Some 20 q's r given order is not correct

21) a,bb,ccc,dddd,eeeee..... in this series what is the 288'th letter

22)A cube is cut in its edges to make it hectogon and some question

asked on it

23)Problem on Sphere's from mensuraiton

24)calender problem

25,26)Height's and Distances problem

27)A two digit no written on the blackboard and one digit is erased the

remaining digit is some percent in original no it's value is given.

what is the digit erased

ALL other problems some from mensuration and mathes