internet systems consortium sample programming placement paper level1
TRANSCRIPT
-
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
1/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
TITLE:Internet Systems Consortium Sample Programming Placement
Paper Level1
(Bolded option is your answer)
1.void start() {
A a = new A();
B b = new B();
a.s(b);
b = null; /* Line 5 */
a = null; /* Line 6 */
System.out.println("start completed"); /* Line 7 */
}When is the B object, created in line 3, eligible for garbage collection?
A after line 5 B after line 6 C after line 7 D There is no
way to be
absolutely
certain.
2.public Object m()
{
Object o = new Float(3.14F);Object [] oa = new Object[l];
oa[0] = o; /* Line 5 */
o = null; /* Line 6 */
oa[0] = null; /* Line 7 */
return o; /* Line 8 */
}
When is the Float object, created in line 3, eligible for garbage
collection?A just after
line 5
B just after line 6 C just after
line 7
D just after line
8
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/ -
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
2/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
3. Which interface provides the capability to store objects using a key-
value pair?
AJava.util.Map B Java.util.Set C Java.util.List DJava.util.Collect
ion
4. Which collection class allows you to associate its elements with key
values, and allows you to retrieve objects in FIFO (first-in, first-out)
sequence?
A
java.util.Array
List
B
java.util.LinkedHash
Map
C
java.util.Hash
Map
D
java.util.TreeM
ap5. Which is valid declaration of a float?
A float f = 1F; B float f = 1.0; C float f = "1"; D float f = 1.0d;
6. Which of the following are valid calls to Math.max?
1.Math.max(1,4)
2.Math.max(2.3, 5)
3.Math.max(1, 3, 5, 7)
4.Math.max(-1.5, -2.8f)
A 1, 2 and 4 B 2, 3 and 4 C 1, 2 and 3 D 3 and 4
7. What is the name of the method used to start a thread execution?
A init(); B start(); C run(); D resume();
8.Which of the following will directly stop the execution of a Thread?
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/ -
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
3/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
A wait() B notify() C notifyall() D null()
9. Which will contain the body of the thread?
A run(); B start(); C stop(); D main();
10. Which class or interface defines the wait(), notify(),and notifyAll()
methods?
A Object B Thread C Runnable D Class
11. What is the prototype of the default constructor?
A Test( ) B Test(void) C public Test( ) D public
Test(void)
12. You want a class to have access to members of another class in the
same package. Which is the most restrictive access that accomplishes
this objective?
A public B private C protected D default
access
13. What is the narrowest valid returnType for methodA in line 3?
public class ReturnIt
{
returnType methodA(byte x, double y) /* Line 3 */
{return (long)x / y * 2;
}
}
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/ -
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
4/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
A int B byte C long D double
14. Given a method in a protected class, what access modifier do youuse to restrict access to that method to only the other members of the
same class?
A final B static C private D protected
15.Which four options describe the correct default values for array
elements of the types indicated?
1.int -> 02.String -> "null"
3.Dog -> null
4.char -> '\u0000'
5.float -> 0.0f
6.boolean -> true
A 1, 2, 3, 4 B 1, 3, 4, 5 C 2, 4, 5, 6 D 3, 4, 5, 6
16. Which is a reserved word in the Java programming language?
A method B native C subclasses D reference
17. What is the numerical range of a char?
A -128 to 127 B -(215) to (215) - 1 C 0 to 32767 D 0 to 65535
18.Which of the following is NOT an Arithmetic operator in C#.NET?
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/ -
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
5/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
A ** B + C / D %
19. Which of the following is the correct output for the C#.NET codesnippet given below?
Console.WriteLine(13 / 2 + " " + 13 % 2);
A 6.5 1 B 6.5 0 C 6 0 D 6 1
20. What will be the output of the C#.NET code snippet given below?
int num = 1, z = 5;
if (!(num
-
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
6/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Sample x = new Sample();
x.i = 10;
fun(x);
Console.Write(x.i + " ");
}
static void fun(Sample y)
{
y.i = 20;
Console.Write(y.i + " ");
}
}}
A 10 20 B 10 10 C 20 10 D 20 20
22. How many bytes will the structure variable samp occupy in memory
if it is defined as shown below?
class Trial
{int i;
Decimal d;
}
struct Sample
{
private int x;
private Single y;
private Trial z;}
Sample samp = new Sample();
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/ -
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
7/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
A 20 bytes B 12 bytes C 8 bytes D 16 bytes
23. Which of the following is NOT a namespace in the .NET FrameworkClass Library?
A
System.Proce
ss
B System.Security C
System.Drawin
g
D System.Xml
24.Which of the following CANNOT belong to a C#.NET Namespace?
A class B struct C enum D Data
25. What happens when a class with parameterized constructors and
having no default constructor is used in a program and we create an
object that needs a zero-argument constructor?
A Compile-
time error.
B Preprocessing
error.
C Runtime
error.
D Runtime
exception.
26. A function with the same name as the class, but preceded with a
tilde character (~) is called __________ of that class.
A constructor B destructor C function D object
27. A union that has no constructor can be initialized with another
union of __________ type.
A different B same C virtual D class
28.Which of the following gets called when an object goes out ofscope?
A constructor B destructor C main D virtual
function
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/ -
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
8/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
29.Which of the following cannot be declared as virtual?
A Constructor B Destructor C DataMembers D Both A and C
30. Which of the following are NOT provided by the compiler by
default?
A Destructor B Zero-argument
Constructor
C Copy
Destructor
D Copy
Constructor
31. If the programmer does not explicitly provide a destructor, then
which of the following creates an empty destructor?
A
Preprocessor
B Compiler C Linker D main()
32.How will you print \n on the screen?
A printf("\n"); B echo "\\n"; C printf('\n'); D printf("\\n");
33. Which of the following function is more appropriate for reading in amulti-word string?
A printf(); B scanf(); C gets(); D puts();
34.Which of the following correctly shows the hierarchy of arithmetic
operations in C?
A / + * - B * - / + C + - / * D / * + -
35. In which numbering system can the binary number
1011011111000101 be easily converted to?
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/ -
7/29/2019 Internet Systems Consortium Sample Programming Placement Paper Level1
9/9
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
Visitwww.latestoffcampus.com for placement papers, interview tips & job updates. Toget
freeupdates tomailhttps://groups.google.com/group/latestoffcampusLive updates on Facebook @
https://www.facebook.com/LatestOffCampus
A Decimal
system
B Hexadecimal
system
C Octal system D No
36.Which bitwise operator is suitable for turning on a particular bit in anumber?
A &&
operator
B & operator C || operator D | operator
http://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttp://www.latestoffcampus.com/http://www.latestoffcampus.com/http://www.latestoffcampus.com/https://groups.google.com/group/latestoffcampushttps://groups.google.com/group/latestoffcampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/https://www.facebook.com/LatestOffCampushttps://groups.google.com/group/latestoffcampushttp://www.latestoffcampus.com/