Freshers Developer Test 1

Name *


email id *


Education *

Enter your Degree, College / University, Year of Passing, Grades

Mobile Number *



1. a) Find the missing no.

  3, 11, 19, 27, ?

1. b) Find the missing no.

86, ?, 79, 75, 72, 68

1. c) Find the missing no.

      516, 497, 478, 459, ?

1. d) Find the missing no.

 

8

?

6

9

7

5

7

3

6

4

1. e) Find the missing no.

            98, 94, ?, 70, 38

2. X and Y both drive to their home 400 miles away in their cars. X drives an average speed of 60 mph and Y drives at 50 mph. During their journey, X stops for a total of 1 hour and 20 mins and Y stops for half as long. What is the difference in minutes between their arrival times?


3. A mixture of 85 kg contains milk and water in the ratio 27 : 7. How much more water is to be added to get a new mixture containing milk and water in the ratio 3:1?


4. In a class of 120 students numbered 1 to 120, all even numbered students opt for Physics, whose numbers are divisible by 5 opt for Chemistry and those whose numbers are divisible by 7 opt for Math. How many opt for none of the three subjects?


5. Directions for questions a to e: These questions are based on the following diagram.


Circle A represents even numbers from 2 to 50.

Circle B represents odd numbers from 2 to 50.

Circle C, represents prime numbers from 2 to 50.

abcd
a. How many elements are there in set A only? a. 25 b. 24 c. 23 d. 22
b. How many elements are there in set B only? a. 14 b. 25 c. 10 d. 13
c. How many elements are there in B n C? a. 14 b. 11 c. 24 d. 13
d. How many elements are there in A U C? a. 0 b. 1 c. 2 d. 3
e. How many elements are there in C' (complement of C)? a. 35 b. 25 c. 34 d. 14
6. Two pipes can fill a tank in 12 minutes and 20 minutes respectively. Both pipes are opened together and after some time the first pipe is closed and the tank is full in totally 10 minutes. For how many minutes was the first pipe open?



7. Write a program to swap two values of given variables without using third variable a. using XOR operator b. not using XOR operator

Input values should be taken from the User. For Eg if user gave a=20,b=45 then output should be a=45 and b=20

8. Write a program using functions to get. From number,To number,Dividing number from user and display the divisible values

Input values should be taken from User.For Eg: From 5 to 15 divisible by 4 Ans(8,12)

9. Write a program to Count the number of each Vowel and total no. of vowels in a given String?

For Eg: Input is "Welcome User" the output has to be

e-3 

o-1

u-1

total -5

Check both upper and lower case

 

10. What will be the output (7500 > '15,000') ? true : false;


11. What is the output of the following code

char symbol[3]={‘c’,‘a’,‘t’};

for (int index=0; index<3; index++)

cout << symbol [index];

12. Given two variables, num1 and num2, which of the following would mean that both num1 and num2 are positive integers?



13. Given 2 tables created and populated as:

CREATE TABLE dbo.envelope(id int, user_id int);

CREATE TABLE dbo.docs(idnum int, pageseq int, doctext varchar(100));

 

INSERT INTO dbo.envelope VALUES

  (1,1),

  (2,2),

  (3,3);

 

INSERT INTO dbo.docs(idnum,pageseq) VALUES

  (1,5),

  (2,6),

  (null,0);

What will be the result of the following querry

UPDATE docs SET doctext=pageseq FROM docs INNER JOIN envelope ON envelope.id=docs.idnum

WHERE EXISTS (

  SELECT 1 FROM dbo.docs

  WHERE id=envelope.id

);

14. Given a table TBL with a field Number that has rows with the following values:

1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1

 

Write a query to add 5 where Number is 0 and add 6 where Number is 1.

15. How do you get the last id from a table without using max function?