Capgemini previously asked questions
1 Three pipes, A, B, & C are attached to a tank. A & B can fill it in 20 & 30 minutes respectively while C can empty it in 15 minutes. If A, B & C are kept open successively for 1 minute each, how soon will the tank be filled?
2 Output of the following program is
e) Syntax error
3 What is the output in the following program
unsigned int u =-16;
e) None of these
4 Two trains are traveling from point A to point B such that the speed of first train is 65 kmps and the speed of 2 train is 29 kmph. Where is the distance b/w A&B such that the slower train reached 5 hrs late compared to the faster.
5 if a row dominated two dimensional array in the following which one is advantage and why?
Consider the prog and select answer
void main ( )
printf (%d ,j);
6 If Log2 x - 5 Log x + 6 = 0, then what would the value / values of x be?
Ans.. x = e2 or e3.
7 What is HQL ?
HQL stands for Hibernate Query Language. Hibernate allows the user to express queries in its own portable SQL extension and this is called as HQL. It also allows the user to express in native SQL.
JSP is used mainly for presentation only. A JSP can only be HttpServlet that means the only supported protocol in JSP is HTTP. But a servlet can support any protocol like HTTP, FTP, SMTP etc.
8 What is Struts Validator Framework ?
Struts Framework provides the functionality to validate the form data. It can be use to validate the data on the users browser as well as on the server side. Struts Framework emits the java scripts and it can be used validate the form data on the client browser. Server side validation of form can be accomplished by sub classing your From Bean with DynaValidatorForm class.
9 How many types of literals are there in JAVA ?
There are four types of literals they are Integer literals, Floating point literals, Boolean literals and character literals.
10 What is ActionServlet ?
The class org.apache.struts.action.ActionServlet is the called the ActionServlet. In the the Jakarta Struts Framework this class plays the role of controller. All the requests to the server goes through the controller. Controller is responsible for handling all the requests.