Skip to main content

IBM Campus Placement Paper (Technical-C C++, DS, SQL, Aptitude)

IBM Campus Placement Paper (Technical-C C++, DS, SQL, Aptitude)
____________________________________________________________


1.7^253. last digit?


ans. 7


2.10^10^10 how much time will it take to write this number, if it takes 1 sec to write 1 digit.


a.1000 secs.
b.10 year.
c. more than 1 million years.
d. a few days.


ans. more than 1 million years.


3. starting from 2 upto how many numbers we need to check whether 907 is prime or not?


4. a persons age is similar to the year he was born (last two digits is counted as age). ans. 80.


5. what is YACC? ans. yet another compiler compiler.


6. flop is a unit of ? ans. processing speed.


7.#define hello(x,y) printf(#expr”%d”,expr);
main()
{
float x=1,y=2;
expr=x/y;
hello(expr);
}


ans. x/y=1;


8.time and work and days.


9. A & B fill 3 litres and 5 litres of oil in the car. C pays Rs. 8/- to A & B. How much will A get?


10. a question on “set” theory. it was given that less than 30 persons in class.


(Ans . cannot be determined.).


11. 4 cows are there at the four corners of a square. if the radius of the rope is 1 and lenth of one side of the square is 14, find the area along the square which the cow cannot gaze.


ans. 14*14-pi*r*r;


12. two glasses were filled with 1/3 and 1/4 milk. they were filled with water &then mixed in tumbler. what is the percentage of milk in the resultant.


13. average speed 2xy/x+y.


14. A belongs to the truther tribe ” who says yes”. B belongs to the liers tribe ” who says no always”.when A&B were asked to which group do they belonged to both of them replied “yes”.when a third person C was asked whether A&B belong to same group,he notified groups he answered “No”.to which group do A,B and C belong?


ans.LLL or LTT.


15.There were three clocks they gave alarm after 24secs, 12secs and 36 secs.if they rang simultaneously at 8:20, then at what time they again rang simultaneously? (something like this but numbers may differ).


ans. 8:27:12


16.a plane starts from a place A , it goes 1000 kms south then 1000km east then 1000 km north and 1000km west, what is it distance from the starting place?


ans. same starting place.


17.question on Bipartite graph (definition).


18.heap-sorting algorithm time complexity. (Ans: nlogn)


19.white-box testing.


20.postfix evaluation of: (A+B)*C(Ans: AB+C*)


21.question on catch-throw? c++


22.parity bit?(Ans: as error detection).


23.
main()
{
main();
}


ans.stack overflow.


24.
main()
{
char a,b;
printf(“%d%d%d%d”,sizeof(‘a’);
sizeof(NULL),sizeof(b),sizeof(main));
}


Ans(1,1,1,2)


25.five file sizes given . what should be the order of their access so that least time is taken.


ans. least size first.


26. SQL query does what?


27. 5 questions on reasoning

Comments

Popular posts from this blog

WAP to calculate the monthly telephone bills as per the following rule: Minimum Rs. 200 for upto 100 calls. Plus Rs. 0.60 per call for next 50 calls. Plus Rs. 0.50 per call for next 50 calls. Plus Rs. 0.40 per call for any call beyond 200 calls.

  #include<iostream.h> #include<conio.h> void main() { int calls; float bill; cout<<" Enter number of calls : "; cin>>calls; if (calls<=100) bill=200; else if (calls>100 && calls<=150) { calls=calls-100; bill=200+(0.60*calls); } else if (calls>150 && calls<=200) { calls=calls-150; bill=200+(0.60*50)+(0.50*calls); } else { calls=calls-200; bill=200+(0.60*50)+(0.50*50)+(0.40*calls); } cout<<" Your bill is Rs. "<<bill; getch(); }   Output: Enter number of calls : 190 Your bill is Rs.250

C++ Program to define a Class BOOK and accessing member function using its object.

  #include<iostream.h> #include<stdio.h> #include<conio.h> class BOOK { int BOOKNO; char BOOKTITLE[20]; float PRICE; void TOTAL_COST( int N) { float tcost; tcost=PRICE*N; cout<<tcost; } public : void INPUT() { cout<<" Enter Book Number "; cin>>BOOKNO; cout<<" Enter Book Title "; gets(BOOKTITLE); cout<<" Enter price per copy "; cin>>PRICE; } void PURCHASE() { int n; cout<<" Enter number of copies to purchase "; cin>>n; cout<<" Total cost is "; TOTAL_COST(n); } }; void main() { BOOK obj; obj.INPUT(); obj.PURCHASE(); getch(); }

Addition of Two Number using servlet and jsp

index.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" > < html > < head > < meta http-equiv ="Content-Type" content ="text/html; charset=UTF-8" > < title > JSP Page </ title > </ head > < body bgcolor ="yellow" > < center >< h1 > Addition of Two Number </ h1 ></ center > < form action =" additionservlet " method ="post" > < table border ="0" width ="100" align ="center" > < tr > < td > First Number </ td > < td >< input type ="text" name ="txtnum1" value ="" /></ td > ...