0% found this document useful (0 votes)
8 views

Layertech Qution Paper 1

The document contains a series of multiple-choice questions covering various topics in programming, mathematics, and general knowledge. It includes questions on C programming concepts, Java programming, algorithms, probability, and basic arithmetic. Additionally, it discusses a company's production cost structure and profit margins related to foreign exchange fluctuations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Layertech Qution Paper 1

The document contains a series of multiple-choice questions covering various topics in programming, mathematics, and general knowledge. It includes questions on C programming concepts, Java programming, algorithms, probability, and basic arithmetic. Additionally, it discusses a company's production cost structure and profit margins related to foreign exchange fluctuations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Layer Tech IT Solutions Pvt Ltd

1. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1
A. rem = 3.14 % 2.1;

B. rem = modf(3.14, 2.1);

C. rem = fmod(3.14, 2.1);

D. Remainder cannot be obtain in floating point division.

2. Which of the following special symbol allowed in a variable name?


A. * (asterisk) B. | (pipeline)

C. - (hyphen) D. _ (underscore)

3. How would you round off a value from 1.66 to 2.0?


A. ceil(1.66) B. floor(1.66)

C. roundup(1.66) D. Roundto(1.66)

4. What will you do to treat the constant 3.14 as a long double?


A. use 3.14LD B. use 3.14L

C. use 3.14DL D. use 3.14LF

5. Which of the following is the correct order of evaluation for the below expression?
z = x + y * z / 4 % 2 - 1
A. */%+-= B. =*/%+-

C. /*%-+= D. *%/-+=

6. How will you print \n on the screen?


A. printf("\n"); B. echo "\\n";

C. printf('\n'); D. printf("\\n");

7.. How many times the while loop will get executed if a short int is 2 byte wide?
#include<stdio.h>
int main()
{
int j=1;
while(j <= 255)
{
printf("%c %d\n", j, j);
j++;
}
return0;
}

A. Infinite times B. 255 times

C. 256 times D. 254 times

8. Which of the following cannot be checked in a switch-case statement?


A. Character B. Integer

C. Float D. enum

9. Point out the error in the program

#include<stdio.h>
int main()
{
int i;
#if A
printf("Enter any number:");
scanf("%d", &i);
#elif B
printf("The number is odd");
return0;
}

A. Error: unexpected end of file because there is no matching #endif

B. The number is odd

C. Garbage values

D. None of above

10. Which of the following are correct preprocessor directives in C?


1: #ifdef
2: #if
3: #elif
4: #undef

A. 1, 2 B. 4

C. 1, 2, 4 D. 1, 2, 3, 4
11. Process is
A. program in High level language kept on disk

B. contents of main memory

C. a program in execution

D. a job in secondary memory

E. None of the above

12. The Memory Buffer Register (MBR)


is a hardware memory device which denotes the location of the current instruction being
A.
executed.

is a group of electrical circuits (hardware), that performs the intent of instructions


B.
fetched from memory.

C. contains the address of the memory location that is to be read from or stored into.

contains a copy of the designated memory location specified by the MAR after a "read"
D.
or the new contents of the memory prior to a "write".

E. None of the above

13. The LRU algorithm


A. pages out pages that have been used recently

B. pages out pages that have not been used recently

C. pages out pages that have been least used recently

D. pages out the first page in a given area

E. None of the above

14. The FIFO algorithm


A. executes first the job that last entered the queue

B. executes first the job that first entered the queue

C. execute first the job that has been in the queue the longest

D. executes first the job with the least processor needs

None of the above


15. The register or main memory location which contains the effective address of the operand is
known as
A. pointer

B. indexed register

C. special location

D. scratch pad

E. None of the above

CORE JAVA

16. What is the name of the method used to start a thread execution?
A. init(); B. start();

C. run(); D. resume();

17. Which cannot directly cause a thread to stop executing?


A. Calling the SetPriority() method on a Thread object.

B. Calling the wait() method on an object.

C. Calling notify() method on an object.

D. Calling read() method on an InputStream object.

18. Which class or interface defines the wait(), notify(),and notifyAll() methods?
A. Object B. Thread

C. Runnable D. Class

19. Which class does not override the equals() and hashCode() methods, inheriting them
directly from class Object?
A. java.lang.String B. java.lang.Double

C. java.lang.StringBuffer D. java.lang.Character

20. You need to store elements in a collection that guarantees that no duplicates are stored and
all elements can be accessed in natural order. Which interface provides that capability?
java.util.Map
A. B. java.util.Set

C. java.util.List D. java.util.Collection
21. Which is valid declaration of a float?
A. float f = 1F; B. float f = 1.0;

float f = 1.0d;
C. float f = "1"; D.

22 .You want subclasses in any package to have access to members of a superclass. Which is the
most restrictive access that accomplishes this objective?
A. public B. private

C. protected D. transient

23.What is the most restrictive access modifier that will allow members of one class to have
access to members of another class in the same package?
A. public B. abstract

C. protected D. synchronized

E. default access

24.Which is true about an anonymous inner class?


A. It can extend exactly one class and implement exactly one interface.

B. It can extend exactly one class and can implement multiple interfaces.

C. It can extend exactly one class or implement exactly one interface.

D. It can implement multiple interfaces regardless of whether it also extends a class.

25.Which constructs an anonymous inner class instance?


A. Runnable r = new Runnable() { };

B. Runnable r = new Runnable(public void run() { });

C. Runnable r = new Runnable { public void run(){}};

D. System.out.println(new Runnable() {public void run() { }});

26. The system of equations:

-2x + y + z = a; x - 2y + z = b; x + y – 2z = c

Have no solution if:

a) a + b + c ≠ 0 b) a + b + c = 0 c) a=1, b=1, c= -2 d)none of these

27. Maxima and minima occur:


a) Simultaneously b) once c) alternately d) rarely

28. A rectangular box with square base is open at the top. The maximum volume of the box made
from 300 m2 wood is:
a) 500
b) 1000
c) 1500
d) 2000

29. An urn contains 5 red and 10 black balls. 8 of them are placed in another urn. The chance that
the latter then contains 2 red and 6 black balls is:
a) 140/429
b) 129/440
c) 139/420
d) None of these

30. Arrivals at a telephone booth are considered to be Poisson with an average time of 10 min
between successive arrivals. The length of a phone call is distributed exponentially with mean 3
min. The probability that an arrival does not have to wait before service is:
a) 0.3
b) 0.5
c) 0.7
d) 0.9

31. Using bisection method the negative root of x3 – 4x + 9 = 0 correct to 3 decimal places is:
a) -2.506
b) -2.706
c) -2.406
d) None of these

32. Differential equation,

Will have a solution of the form


a) (C1 + C2x)e-5x
b) C1e-2x
c) C1e-5x + C2e5x
d) C1e-5x + C2e2x

33. An intelligence agency forms a code of two distinct digits selected from 0, 1, 2….. 9 such that the
first digit of the code is non zero. The code hand written on the slip can however potentially create
confusion when read upside down- for example, the code 91 may appear as 16. How many codes
are there for which no such confusion can arise?
a) 80 b) 78
c) 71 d) 69

34. A can complete a piece of work in 12 days and B is 60% more efficient than A. In how many days
B will complete the same work?

a) 4 days b) 5 days c) 7.5 days d) 9 days

Answers based on the following paragraph

A company imports component A from Germany and component B from USA. It then assembles
them along with other components to produce a machine used in a chemical process. Component A
contributes 30% to the production cost and component B contributes 50% to the production cost.
The current practice is to self the machine at a price that is 20% over the production costs. Due to
foreign exchange fluctuations the German Mark has become costlier than US Dollar by 22%. But the
company is unable to increase the selling price by more than 10%.

35) The current margin of profit is

a) 10% b) 15% c) 12% d) 8%

36) Suppose the US Dollar becomes cheaper by 12% of its original value, and the German Mark
becomes costlier by 20% at its original value. To achieve a profit margin of 10%,the selling price
must exceed the production cost by,

a) 10% b) 20% c) 12% d) 15%

Frankfurt is 5 hours ahead of Boston but 5 hours behind India. For example if it is 10 A.M. on a
particular day in Frankfurt, then it is 5 A.M. on the same day in Boston and 3 P.M. on the same day
in India.

James started at Boston at 6 P.M on Friday and reached Frankfurt on Saturday at 7 A.M. He then
left for India at 12 noon to reach India at 1 A.M. on Sunday.

37) If the total distance between Boston and India is 12000 kms , the average speed of James is

a) 800 kmph b) 900 kmph c) 700 kmph d) 750 kmph

38) On return Journey , if James starts from India at 10 P.M. on Sunday , at what time does he reach
Boston assuming he takes same route but stops at Frankfurt for one hour less?

a) 8 A.M. b) 6 A.M. c) 10 A.M. d) 6 P.M.


39. A colony in a container grows by each bacterium splitting into eight next generation bacteria.
However because of environmental conditions only 50% of the bacteria in a generation can split as
above. A colony of first generation was put in a container and it was found that the number of
seventh generation bacteria was 4096 million. What was the size of the first generation population
initially put in the container?

a) 2 million b) 8 million c) 1 million d) 4 million

40. which of these words is a synonym for “ephemeral”?


a)permanent b)temporary c)large d)important

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy