Q76. In order to display address, we need :
A. %q
B. %a
C. %p
D. None of the mentioned
Ans. C
Q77. Which of the following does not initialize ptr to null
(assume a = 0) ?
A. int *ptr = &a;
B. int *ptr = &a – &a;
C. int *ptr = a – a;
D. All of the above
Ans. A
Q78. When a function is called by itself again and again, then it
is :
A. call by value
B. call by reference
C. recursion
D. System Call
Ans. C
Q79. Which can never be called by using call by value method :
A. Structure
B. Union
C. Array
D. All of the above
Ans. C
Q80. What is the maximum number of arguments that can be passed
in a single function ?
A. 341
B. 263
C. 253
D. 308
Ans. C
Q81. Problems associated with dangling pointer can be solved :
A. Assigning it to garbage value
B. Assigning it to NULL value
C. Assigning it to 0
D. None of these
Ans. C
Q82. Which header file can be used to define i/o function
prototypes and macros?
A. stdio.h
B. conio.h
C. stlib.h
D. alloc.h
Ans. A
Q83. What is the use of ‘%%’ specifier ?
A. Finding remainder
B. Finding quotient
C. Printing % sign
D. None of the above
Ans. C
Q84. Which of the following statement is wrong about Java
Programming ?
A. Java is compiled and Interpreted
B. Java follows OOPs paradigm
C. Java uses destructors to undo work done by constructors
D. Java is platform independent
Ans. C
Q85. Which is used to find and fix bugs in the java programs ?
A. JVM
B. JRE
C. JDK
D. JDB
Ans. D
Q86. Which of the following is a reserved keyword in Java?
A. strictfp
B. String
C. main
D. system
Ans. A
Q87. Which of the following is a mutable class in Java ?
A. java.lang.String
B. java.lang.Byte
C. java.lang.Short
D. java.lang.StringBuilder
Ans. D
Q88. Number of threads that can be executed at a time ?
A. 1
B. Multiple
C. Main Thread
D. 2
Ans. B
Q89. Which is a wrong keyword as a access modifier ?
A. public
B. default
C. protected
D. private
Ans. B
Q90. Class X extends Y implements Z shows what kind of a
relationship ?
A. X is a Y, X is a Z
B. X has a Z
C. X is a Y, has a Z
D. None of these
Ans. A
Q91. Method overloading does not allow :
A. Difference in no. of arguments.
B. Difference in Arguments data type.
C. Difference in return type.
D. Difference in method name.
Ans. D
Q92. If a common property is referred by many objects of same
class, then that property must be declared as _ in class.
A. static
B. void
C. transient
D. final
Ans. A
Q93. Which is a wrong combination of keywords ?
A. public abstract
B. static abstract
C. static final
D. None of these
Ans. B
Q94. How can you read the content of a class file on console ?
A. java
B. javap
C. javac
D. javadoc
Ans. C
Q95. How many type of Primitive Data Types exist in Java?
A. 4
B. 6
C. 8
D. 12
Ans. C
Q96. If you access an uninitialized local variable will result?
A. 0 will be printed
B. Runtime Error
C. Compile Error
D. None of these
Ans. C
Q97. Which Class provides you a Mutable String with thread safe
and thread unsafe operations ?
A. String & StringBuilder
B. StringBuilder & StringBuffer
C. String & StringBuffer
D. None of these
Ans. B
Q98. How to sort an array in Java ?
A. Array.sort()
B. Arrays.sort()
C. Collection.sort()
D. System.sort()
Ans. B
Q99. An array elements are always stored in __ memory
locations.
A. Sequential
B. Random
C. Both
D. None
Ans. A
Q100. What is the order of variables in Enum in Java ?
A. Ascending order
B. Descending order
C. Random order
D. Depends on the order() method.

0 Comments