Search This Blog

27 August, 2011

Android for beginner - First example

Start the eclipse :-











End!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!









22 August, 2011

Session Related Interview Questions


Question: What is a Session?
Answer: A Session refers to all the request that a single client makes to a server. A session is specific to the user and for each user a new session is created to track all the request from that user. Every user has a separate session and separate session variable is associated with that session. In case of web applications the default time-out value for session variable is 20 minutes, which can be changed as per the requirement.



Question: What is Session ID?
Answer: A session ID is an unique identification string usually a long, random and alpha-numeric string, that is transmitted between the client and the server. Session IDs are usually stored in the cookies, URLs (in case url rewriting) and hidden fields of Web pages. 



Question: What is Session Tracking?
Answer: HTTP is stateless protocol and it does not maintain the client state. But there exist a mechanism called "Session Tracking" which helps the servers to maintain the state to track the series of requests from the same user across some period of time. 



Question: What  are different types of Session Tracking?
Answer: Mechanism for Session Tracking are:
   a) Cookies
   b) URL rewriting
   c) Hidden form fields
   d) SSL Sessions



Question: What is HTTPSession Class?
Answer: 
HttpSession Class provides a way to identify a user across across multiple request. The servlet container uses HttpSession interface to create a session between an HTTP client and an HTTP server. The session lives only for a specified time period, across more than one connection or page request from the user.

Question: Why do u use Session Tracking in HttpServlet?
Answer: In HttpServlet you can use Session Tracking to track the user state. Session is required if you are developing shopping cart application or in any e-commerce application.


Question: What are the advantage of Cookies over URL rewriting?
Answer: Sessions tracking using Cookies are more secure and fast. Session tracking using Cookies can also be used with other mechanism of Session Tracking like url rewriting.

Cookies are stored at client side so some clients may disable cookies so we may not sure that the cookies may work or not.
In url  rewriting requites large data transfer from and to the server. So, it leads to network traffic and access may be become slow.



Question: What is session hijacking?
Answer: 
If you application is not very secure then it is possible to get the access of system after acquiring or generating the authentication information. Session hijacking refers to the act of taking control of a user session after successfully obtaining or generating an authentication session ID. It involves an attacker using captured, brute forced or reverse-engineered session IDs to get a control of a legitimate user's Web application session while that session is still in progress.


Question: What is Session Migration?
Answer: Session Migration is a mechanism of moving the session from one server to another in case of server failure. Session Migration can be implemented by:
a) Persisting the session into database
b) Storing the session in-memory on multiple servers.



Question: How to track a user session in Servlets?
Answer: The interface HttpSession can be used to track the session in the Servlet. Following code can be used to create session object in the Servlet: HttpSession session = req.getSession(true);



Question: How you can destroy the session in Servlet?
Answer: You can call invalidate() method on the session object to destroy the session. e.g.session.invalidate();

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

11 August, 2011

Nucleus


PROFILE
NUCSOFT was incorporated in 1994 with an objective of providing focused end-to-end IT solution to the ‘Banking, Financial Services and Insurance’ industry segment (BFSI). Over the years NUCSOFT has developed in-depth understanding of the workflow and operations that take place across this segment. 
This unique understanding empowersa NUCSOFT to work with a much closer understanding with its clients, building integrally inter-dependent relationships that enable their clients to focus on, and enhance their core competencies.
 
NUCSOFT in its current state has more than 1,500 man-years of experience, employs 250+ IT professionals and has expanded its operation to UK & USA.

PAPER 1
APTITUDE SECTION
Q. 5 men or 8 women do equal amount of work in a day. a job requires 3 men and 5 women to
finish the job in 10 days how many woman are required to finish the job in 14 days.
a) 10
b) 7 
c) 6 
d) 12
Ans 7
Q. A simple interest amount of rs 5000 for six month is rs 200. what is the anual rate of interest?
a) 10%
b) 6% 
c) 8%
d) 9% 
Ans 8%
Q. In objective test a correct ans score 4 marks and on a wrong ans 2 marks are ---. a student
score 480 marks from 150 question. how many ans were correct?
a) 120
b) 130
c) 110
d) 150
Ans130.
Q. An artical sold at amount of 50% the net sale price is rs 425 .what is the list price of the artical?
a) 500
b) 488
c) 480 
d) 510 
Ans 500
TECHNICAL SECTION
Q. You are creating a Index on EMPNO column in the EMPLOYEE table. Which statement will you
use?
a) CREATE INdEX emp_empno_idx ON employee, empno;
b) CREATE INdEX emp_empno_idx FOR employee, empno;
c) CREATE INdEX emp_empno_idx ON employee(empno); 
d) CREATE emp_empno_idx INdEX ON employee(empno);
Ans. c
Q. Which program construct must return a value?
a) Package
b) Function 
c) Anonymous block
d) Stored Procedure
e) Application Procedure
Ans. b
Q. Which Statement would you use to remove the EMPLOYEE_Id_PK PRIMARY KEY constraint
and all depending constraints fromthe EMPLOYEE table?
a) ALTER TABLE employee dROP PRIMARY KEY CASCAdE; 
b) ALTER TABLE employee dELETE PRIMARY KEY CASCAdE;
c) MOdIFY TABLE employee dROP CONSTRAINT employee_id_pk CASCAdE;
d) ALTER TABLE employee dROP PRIMARY KEY employee_id_pk CASCAdE;
e) MOdIFY TABLE employee dELETE PRIMARY KEY employee_id_pk CASCAdE;
Ans. a
Q. Which three commands cause a transaction to end? (Chosse three)
a) ALTER
b) GRANT 
c) DELETE
d) INSERT
e) UPdATE
f) ROLLBACK 
Ans. a ,b ,f
Q. Under which circumstance should you create an index on a table?
a) The table is small.
b) The table is updated frequently.
c) A columns values are static and contain a narrow range of values
d) Two columns are consistently used in the WHERE clause join condition of SELECT 
statements.
Ans.d
Q. What is the common standard naming convention of checkbox control?
a) CHB
b) CHK 
c) CHX
d) CBX
Q. Which of the function returns a reference to an object provided by an ActiveX component.
a) createobject
b) getobjectname 
c) createobjectx 
d) getobject
Q. We have something like Global functions in JAVA, they are called as .....
a) class
b) package 
c) file 
d) include
Q. Which all OS supports Networking?
a) Windows 95 
b) Linux 
c) Windows 3.0 
d) Unix
Q. Which of the following is not an RdBMS?
a) Ingres 
b) Oracle 
c) Unify 
d) Clipper
Q. Shell function in VB is used for calling
a) Another Function 
b) Another Procedure 
c) Another Application 
d) None 
Q. The RdBMS which satisfies the most number of its Principle among the followings
a) MS SqlServer 
b) Oracle 7.3 
c) Informix 
d) Sybase 
Q. Normalization is considered to be complete when it is in 
a) Second Form 
b) Third Form 
c) First Form 
d) None
Q. Two databases can be connected with 
a) Where Clause 
b) creating link 
c) using dbo.
d) Both B & C
Q. C++ is similar to that of C in following ways
a) C++ has classes
b) Supports Inheritance
c) File Handling
d) None
Q. Which of the following is not system file.
a) .ini
b) .sys
c) .com
d) None
Q. Following command is used to register any dll or ocx in registry of the system
a) regserver32
b) registersvr
c) regsrv32
d) regsvr32
Q. Which keyword is used to unregister any dll or ocx in registry of the system
a) -u
b) -r
c) -d
d) -x
Q. Which is not the most important & widely used form of Normalization ?
a) Boyce-Codd Normal Form
b) Second Form
c) Third Form
d) Royce-Codd Normal Form
Q. How can the word YES be stored in any array.
a) 
array[1] = 'Y'
array[2] = 'E'
array[3] = 'S'
array[4] = '\0'
b) 
array[0] = "Y"
array[1] = "E"
array[2] = "S"
array[3] = "\0"
c) 
array[1] = "Y"
array[2] = "E"
array[3] = "S"
Q. Which of the following keyword is used to exit unconditionally from the batch?

a) go
b) return
c) Begin & End
d) Commit Tran


Q. != is a ---------- operator.

a) relational
b) logical
c) String
d) arithmetic


Q. What was the first name given to Java Programming Language.

a) Oak - Java
b) Small Talk
c) Oak
d) None
Ans.a

Q. The syntax of Java is similar to that of

a) C
b) Small Talk
c) FORTRAN
d) C++


Q. Which of the following statement is true

Table in a database can have
a) One Non-Clustered Index and Many Clustered Indexes.
b) One Clustered Index and Many Non-Clustered Indexes.
c) One Index each of Clustered and Non-Clustered Index.
d) None


Q. Check the error in the following statement

Country[7] = 'CANADA'

a) A string terminator is not added to the string, when declared.
b) Country array should be of six
c) Canada should be specified in double quotes.
d) Country array should have the keyword char to ensure array type.


Q. An application updates table "A",which causes trigger T1 to fire. T1 updates table "B", which in turns fires trigger T2. T2 updates table "A", which causes trigger T1 to fire again. This is an example of

a) Indirect Recursive Trigger
b) direct Recursive Trigger
c) Multiple Trigger
d) Non Recursive Trigger


Q. Linda wants to obtain the nearest integer of a numeric expression for some calculation purpose. Which mathematical function will she use:

a) Round
b) ABS
c) About
d) None


Q. Alphanumeric constants are

a) used for arithmetic calculations
b) Used with double quotas
c) Of integer type or float type
d) Not used for arithmetic calculations


Q. Pseudocode is a

a) set of Instructions to perform a particular task
b) is a formalized graphic representation of program logic.
c) is a algorithm expressed in a simple language
d) Both A & C


Q. A company has closed down its advertisement dept and is now getting all advertisement done by an Ad-Agency. All 20 people working in the dept has quit the job. The dept to which an employee belonged was stored in the "cdept" attribute of "emp" table. Which of the following statement would be used to do the changes in the "emp" table

a) Alter Table
b) Drop Table
c) Delete Table
d) Truncate Table


Q. John wants to retrieve all records from students table who live in any city beginning with WAS . Which of the following statement is to be executed by him

a) Select * from students where city = 'WAS'
b) Select * from students where city = 'WAS%'
c) Select * from students where city in 'WAS'
d) Select * from students where city like 'WAS%'


Q. Why is a Modulo operator used?

a) It is used to determined the remainder, when an integer is divided by another.
b) It is used to calculate the percentage
c) It is used to determine the factorial of a number.
d) It is used as a relational operator.


Q. Consider the following program:

character cName[5] = 'great'
Numeric nNum1,nNum2 =0

For (nNum1 = 0;nNum1=>5;nNum1++)
{
if(cName[nNum1] == 'a'| cName[nNum1] != 'e'| cName[nNum1] == 'i'| cName[nNum1] != 'o'| cName[nNum1] == 'u'|)
{
nNum2 ++
}
}
display nNum2

What does nNum2 display.

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




PAPER 2
here are 2 sections .APTI and TECH .45 min 75 qs for APTI ,TECH has 5qs out of which Q1 is compulsory.Solve any 3 from remaining 4.Time is 1 hr.Marks 40.
there are 2 sets of apti .mine was APTITUDE TEST.other set is apti1.I guess both sets had same qs.only order of qs was different.
NOTE:ALL QS FROM R.S.AGGARWAL.BE CAREFUL NEGATIVE MARKING.QS AT FIRST AND LAST ARE BIT DIFFICULT.
QS of apti.
1.The least no which when divided.....(R.S.AGG PG.31,Q45).
2.1 Q on the formula hcf*lcm=product of numbers.
3.2 qs.onthe formula (a+b)2,(a-b)2.
4.find the smallest among fractions ....
5.simple interest qs.
6.compound interest qs.
7.Venn diagrams given,find the correct dig for the relation brinjal,cabbage,vegetable.
8.odd man out
a) A b)F c)N d)H
ans(a).(all other alphabets have || lines.).
9.One english qs on fill blank,passage given.It was on Democracy.
10.boats and stream problem.
11.Rahul and Radhika age problem.ans. ithink is 15.check out in r.s.agg.
12.avg of 5 nos is given, avg of four nos is gien .Find fifth no. Ans.50.check out.
13.cost price of 2 television = c.p. of 2 Wash machine.cost of t.v gien .Find cost of 4 wash machine and 3 t.v.
14.LIST PRICE GIVEN ,dis given,find s.p..
15.1/z=1/x+1/y.Find z.
16.one qs. similar to (r.s.agg pg. 55 ex.11 solved).
17.a man buys 2 articles at some amount.on one gives 15% dis.other 15% more than price .what is his profit or loss%.
18.A man can do work at same rate of his 2 sons.1 son take ,other 2days.how many days man take.
19.r.s.agg Average solved prob 11.
Technical -II(cs) .NO -VE MARKING FOR THIS.Q1 COMPULSORY.SOLVE ANY 3 FROM REMAIN.1 HR.
1A).write full form of
DLL ,ODBC, TCP/IP, UDP, OLE AND ONE MORE i DONT REM (6M)
1B)DIFF BET CALL BY REF AND CALL BY VALUE. 
EXPLAIN DYANAMIC MEM ALLOCATION. (4M)
Q2A)PRG. GIVEN ON STRING FIND O/P. (6M)
Q2B)WHAT IS OBJECT FILE. (4M) 
Q3A)PRG. ON DOUBLY LINK LIST.GIVE O/P (6M)
3B)WRITE PRG ON CONCATENATION OF STRINS (4M
Q4A WRITE PRG TO FIND PRIME BETWEEN 1 TO 1000 8M
4B WRITE PRG WHICH CONTAIN 2 INLINE COMMANDS 2M
Q5A WHAT ARE IPCS IN UNIX.GIVE NAME OF 3,EXPLAIN 1.
DIFF BET TCP AND IP
5B.DIFF BET MALLOC(),CALLOC()




PAPER 3
Today on 28th feb,2004, Nuleus Software came in our college,HBTI-Kanpur. Their paper was quite easy consisting of 4 sections each of 15 minutes having 15 questions...
1. Quantitative aptitude
2. Logical reasoning
3. General English
4. Technical aptitude


English Section:
  1. gruesome=? (4 choces were given)
    ans:frightful
  2. barbarian=?
    ans:uncivilized
  3. serene=?
    ans:calm
  4. 4 sentences were given,they asked u to choose right senctence.
    ans: How's the weather
  5. Mirror on the wall.They asked to replace on word with meaningful option.
    ans: mirror at the wall. (Plz check.)
  6. He sometimes works________night.
    a)all
    b)at
    c)all of the above
    d)none of above
    ans: c(check)
  7. The document______delivered.
    ans: has been(plz check)
  8. ____ is it from manchaster to london.
    ans: How far
  9. I have______my car.
    ans: driven
  10. Correct the sentence....They have been doing it since 12 months.
    ans: replace 'since' with 'for'
Logical reasoning
  1. if 1234567573 is coded as xxxxxxxxxx and 563423is coded like xxxxxx the 3512 will be coded as? (only format of question, i m mentioning, question is very easy..even a class 3 student will answer)
    ans: RATION
  2. Same as previous question with different data.
    ans: MEAT
    Some analogy questions were given....
  3. dawn:twilight::day:evening/night
  4. Mosquito:maleria::infection:deasease
  5. Writer:book::composer:song
  6. Cloth:scissor::wood:axe
  7. Friend:good::enemy:bad
  8. John and David....Age of both is asked.
    ans: the option in which age of John is 40.
  9. Analogy question...
    ans: Saturday: Monday (check it)
  10. nalogy question...if 20:21 then what is the appropriate choice
    ans:20:21::m:n
Quantitative Aptitude
  1. if a jug evaporates 1/3 rd in first day and 3/4 th of remaining water in the second day.What percentage of water will be
    remaining? ans:20%(check it)ans may be 16.6 viz not given
  2. what is the angle between hands of hour and minute in a clock when the time is 8:30? ans:75 degree
  3. In 10 minutes how many degrees hour hand rotates? ans:5 degree
  4. if 17xy+7 =19xy then 14 xy=?
    a) 2xy-x
    b) 2y
    c) x-2y
    d) don't remember
    ans:8/0.8
  5. 1+1/2+1/3+1/4+1/5=? ans:137/60
  6. If ramu is going in East...turns right..then left..then right by 45 degree....Where is is going now?
    ans: south-west(This option was actually not given)
  7. A clock clicks at 6 o' 6 times.......
    ans: 66
  8. A question on triangle......
    ans:AC>AD
  9. A question asked on Escalator.......?
    ans: 80
  10. 9's complement of 28?
    ans: 71
  11. A question i don't remember...
    ans: 33%
Technical Aptitude:
  1. What is the common standard naming convention of checkbox
    control?
    a) CHB
    b) CHK
    c) CHX
    d) CBX
    ans: a (may be different..plz check)
  2. We have something like Global functions in JAVA, they are called as .....
    a) class
    b) package
    c) file
    d) include
    ans: b
  3. Which OS does not supports Networking?
    a) Windows 95
    b) Linux
    c) Windows 3.0
    d) Unix
    ans: c
  4. Normalization is considered to be complete when it is in
    a) Second Form
    b) Third Form
    c) First Form
    d) None
    ans: d
  5. C++ is similar to that of C in following ways
    a) C++ has classes
    b) Supports Inheritance
    c) File Handling
    d) None
    ans: c
  6. Which is not the most important & widely used form of Normalization ?
    a) Boyce-Codd Normal Form
    b) Second Form
    c) Third Form
    d) Royce-Codd Normal Form
    ans: d
  7. Which of the following keyword is used to exit unconditionally from the batch?
    a) go
    b) return
    c) Begin & End
    d) Commit Tran
    ans:
  8. Which of the following statement is true
    Table in a database can have
    a) One Non-Clustered Index and Many Clustered Indexes.
    b) One Clustered Index and Many Non-Clustered Indexes.
    c) One Index each of Clustered and Non-Clustered Index.
    d) None
  9. Check the error in the following statement
    Country[7] = 'CANADA'
    a) A string terminator is not added to the string, when declared.
    b) Country array should be of six
    c) Canada should be specified in double quotes.
    d) Country array should have the keyword char to ensure array type.
    ans: c
  10. Linda wants to obtain the nearest integer of a numeric ex-pression for some calculation purpose. Which mathematical
    function will she use:
    a) Round
    b) ABS
    c) About
    d) None
    ans: a
  11. Pseudocode is a
    a) set of Instructions to perform a particular task
    b) is a formalized graphic representation of program logic.
    c) is a algorithm expressed in a simple language
    d) Both A & C
    ans: d
  12. A company has closed down its advertisement dept and is now getting all advertisement done by an Ad-Agency. All 20 people working in the dept has quit the job. The dept to which an employee belonged was stored in the "cdept" attribute of "emp" table. Which of the following statement would be used to do the changes in the "emp" table
    a) Alter Table
    b) Drop Table
    c) Delete Table
    d) Truncate Table
    ans: b(plz check)
  13. Why is a Modulo operator used?
    a) It is used to determined the remainder, when an integer is
    divided by another.
    b) It is used to calculate the percentage
    c) It is used to determine the factorial of a number.
    d) It is used as a relational operator.
    ans: a
  14. if f(n)=n+ f(n-1) and f(0)=1 then f(5)=?
    a)14
    b)15
    c)16
    d)none
    ans: c
  15. What is the function of assembler?
    a) To convert assembly language to machine language.
    b) To convert machine language to assembly language.
    c) To convert high level language to...
    d).....
    ans: a

Meetme@