📚 Exam by Category
▾
Objective Questions

Latest ISRO Computer Science Exam Question (Objective Questions), MCQ in English

Subjects : Computer Science

Question Bank Computer Science - English
Back to Exam

Computer Science

Question 1001Single Answer
What would be the result of attempting to compile and run the folowing code ?
//Filename : MyClass.java
public class MyClass
{public satic void main (String [ ] args) {
C c = new ( ) ;
             System.out. printIn(c.max (13.,29));
}
} class A {
int max(intx, intv) if (x>y) return x;else
return y;}
}
class B extends A {
       int max (intx, int y){return super.max
(y,x)-10;}
}
Select the one correct answer.
  1. A
    The code will fail to compile because the max ( ) method in B passes the arguments in the call super.max(y,x)in the wrong order.     
  2. B
    The code will compile without errors and will print 13 when run.
  3. C
    The code will compile without errors and will print 23 when run.       
  4. D
    The code will compile without errors and will print 29 when run.      
Question 1002Single Answer
What is wrong in the following class definitions ?
abstract class print
{
       abstract show ( );
}
      class Display extends Print
{
}
Select the correct answer ?
  1. A
    Nothing is wrong
  2. B
    Wrong. Method show ( ) should have a return type
  3. C
    Wrong. Method show ( ) is not implemented in Display
  4. D
    Wrong Display does not contain any members.
Question 1003Single Answer
What will be the result when you try to compile and run the following code ?
private class Base {
Base ( )
{     int i = 100;
      System.outlprintIn (i);
}
}
public class Pri extends Base {
static int i = 200;
public static void main (String argv [ ]) {
       Pri p = new Pri ( );
       System.out.printIn (i);
     }
}
Select the correct answer ?
  1. A
    Error at compile time
  2. B
    200
  3. C
    100 followed by 200
  4. D
    100
Question 1004Single Answer
Which abstract class is the super class of all classes used for reading bytes.
Select the one correct answer.
  1. A
    Reader
  2. B
    FileReader
  3. C
    ByteReader
  4. D
    InputStream    
Question 1005Single Answer
Which abstract class is the super class of all classes used for writing characters.
Select the one correct answer.
  1. A
    Writer
  2. B
    File Writer 
  3. C
    Char Writer
  4. D
    Output Stream      
Question 1006Single Answer
Which statemetns are true about comparing two instances of the same class, given that the equals() and hash Code methods have been properly overridden ?
  1. A
    If the equals ( ) method returns true, the hashCode()comparison ==might return false.
  2. B
    If the equals() method returns false, the hash code() comparison== might return true
  3. C
    If the hashCode() comparison ==returns ture, the equals() method must return true.
  4. D
    If the hashCode comparison == returns true, the equals() method might return true.
Question 1007Single Answer
Given:
public static void befor () {
Set set = new TreeSet ( );
set.add("2");
set.add(3);
set.add("1");
Iterator it = set.iterator();
while(it.hasNext())System.out.print(it.next( )+" ");
}
Which of the following statements are true ?
  1. A
    The before() method will print 1 2 3
  2. B
    Thebefore( ) method will print three numbers, but the order cannot be determined.
  3. C
    The before ( ) method will not compile
  4. D
    The before ( ) method will throw an exception at runtime.
Question 1008Single Answer
Which exception can the clone ( ) method of the object class throw ?
Select the one correct answer.
  1. A
    CloneNot SupportedException
  2. B
    NotCloneableException
  3. C
    IllegalCloneException
  4. D
    NoClonesAllowedException
Question 1009Single Answer
What will the following prgram print when run ?
public class Round{
       public static void main (String [ ] args) {
System.out.printIn(Math.round/ - 0.5) + " " +
Math.round(0.5));
     }
};
Select the one correct answer.
  1. A
    00
  2. B
    01
  3. C
    - 10
  4. D
    - 11
Question 1010Single Answer
Which expression will evaluate to true ?
Select the one correct answer
  1. A
    "HELLO THERE" equals("hello there")
  2. B
    ("hello" concat("there")) equals("hello there")
  3. C
    "Hello There" .compare To("hello there") == 0
  4. D
    "Hello there" toLowerCase(). equals("hello there")  
Question 1011Single Answer
What will be the result of attempting to compile and run the following program ?
public class MyClass
{
         public static void main (String[ ] args)
{ 
          RuntimeException re=null,
          throw re;
      }
}
select the one correct answer.
  1. A
    The code will fail to compile, since the main ( ) method does not declare that it throws Runtime Exception in its Declaration.
  2. B
    The program will fail to compile, since it cannot throw re.
  3. C
    The program will compile without error and will throw java.lang.RuntimeException when run
  4. D
    The program will compile without error and will throw java.lang.NullPointerException when run.
Question 1012Single Answer
Which digits, and in which order, will be printed when the following prgram is run ?
public class MyClass {
        public static void main (String [ ] args) {
        int k = 0;
        try {
int i = 5/k;
} catch (Airhmetic Exception e) {
         System.out.printIn("1");
         } catch (RuntimeException e) {
         System.out.printIn("2")
         return;
}catch (Exception e) {
        System.out.printIn("3")
}
finally{
       System.out.printIn("4")
}     
       System.out.printIn("5")
       }
}
Select the one correct answer.
  1. A
    The program will only print 5
  2. B
    The program will only print 1 and 4, in that order.
  3. C
    The program will only print 1, 2 and 4, in that order.    
  4. D
    The program will only print 1, 4, and 5, in that order.   
Question 1013Single Answer
Which digits, and in which order, will be printed when the following program is run ?
public class MyClass {
       public static void main (String [largs)
throws InterruptExceptio try {
f ( );
       System.out.printIn("I");
} finally
          System.out.printIn("2");
}
         System.out.printIn("3")
}
         //InterruptedException is a direct subclass of Exception.
         static void f( ) throws InterruptedException {
         throw new InterruptedException("Time to go home.");
          }
}
Select the once correct answer.
  1. A
    The program will print 2 and throw Interrupted Exception.
  2. B
    The program will print 1 and 2, in that order.
  3. C
    The program will print 1,2 and 3, in that order.
  4. D
    The program will print 2 and 3, that order.
Question 1014Single Answer
Which of the following statements about thread is true ? Select the one correct answer.
  1. A
    Every thread starts with a priority of 5
  2. B
    Threads inherit theri priority from their parent thread.
  3. C
    Threads are guaranteed to run with the priority that you set using the setPriority ( ) method.
  4. D
    Thread priority is an integer ranging from 1 to 100   
Question 1015Single Answer
Given the following
class My thread t = new MyThread{
      public static void main (String [ ] args) {
          MyThread t = new My Thread ( );
          Thread x = new Thread (t);
          x.start ( );
}
public void run ( ){
      for(int i = 0;i<3; ++i) {
      System.out.print(i +"..");
} } }
What is the result of this code ?
  1. A
    Compilation fails.
  2. B
    1..2..3..
  3. C
    0..1..2..3..
  4. D
    0..1..2..
Question 1016Single Answer
What will be the result of attempting to compile and run the following
program ?
public class Myclass extends Thread {
       publicMyClass (Strings) {msg = S; }
       String msg;
       public void run ( ) {
          System.out.printIn(msg);
}
public static void main (String [ ]args) {
      new MyClass("Hello")
      newMyClass("World");
}
Select the one correct answer.
  1. A
    The program will fail to compile
  2. B
    The program wil compile without errors and will print a never-ending stream of Hello and World
  3. C
    The program will compile without error and will print Hello and World when run, but order is unpredictable.
  4. D
    The program will compile without errors and will simply terminate without any output when run.
Question 1017Single Answer
The following block of code creates a Thread using a Runnable target.
Runnable target = new MyRunnable();
Thread my Thread = new Thread (target);
Which of the following classes can be used to create the target, so that the preceding code compiles correctly ?
  1. A
    (a) public class Runnable extends Runnable {public void run )}
  2. B
    public class MyRunnable extends Object {public void run ( ) {} }
  3. C
    public class MyRunnable implements Runnable {public void run () { } }
  4. D
    public class MyRunnable implements Runnable {void run() { } }
Question 1018Single Answer
Which one of these events will cause a thread to die ?
Select the one correct answer.
  1. A
    The method sleep ( ) is called.
  2. B
    The method wait ( ) is called.
  3. C
    Execution of the start ( ) method ends.
  4. D
    Execution of the run ( ) method ends
Question 1019Single Answer
Given the following.
class MyThread extends Thread {
      public static void main(String [ ] args) {
      My Thread t = new MyThread
      t.start();
      System.out.print("one. ");
      t.start();
      System.out.print ("two.");
}
   public void run ( ) {
      System.out.print("Thread");
} }
What is the result of this code ?
  1. A
    Compilation fails.
  2. B
    An exception occurs at runtime.
  3. C
    Thread one. Thread two.
  4. D
    The output cannot be determined
Question 1020Single Answer
What can be guaranteed by calling the method yield() ?
Select the one correct Answer
  1. A
    All lower priority threads will be granted CPU time.
  2. B
    The Current thread will sleep for some time while some other thread run.
  3. C
    The current thread will not continue until other threads have terminated.
  4. D
    None of the above
Question 1021Single Answer
Which of the following option leads to the portability and security of java ?
  1. A
    Bytecode is executed by JVM
  2. B
    The applet makes the Java code secure and portable
  3. C
    Use of execption handling
  4. D
    Dynamic binding between objects      
Question 1022Single Answer
Which of the following is not a Java features ?
  1. A
    Dynamic
  2. B
    Architecture Neutral
  3. C
    Use of pointers
  4. D
    Object-oriented      
Question 1023Single Answer
Which of the following is a valid declaration of a char ?
  1. A
    char ch = 'utea';
  2. B
    char ca = 'tea';
  3. C
    char cr = u0223;
  4. D
    char cc = 'tea';      
Question 1024Single Answer
What is the return type of the hashCode () method in the object class ?
  1. A
    Object
  2. B
    int
  3. C
    long
  4. D
    void
Question 1025Single Answer
What does the expression float a = 35/O return ?
  1. A
    O
  2. B
    Not a number
  3. C
    Infinity
  4. D
    Run time exception
Question 1026Single Answer
Given, Array List list = new Array List ();
What is the initial quantity of the Array List ?
  1. A
    5
  2. B
    10
  3. C
    zero
  4. D
    100
Question 1027Single Answer
Which of the access specifiers must be used for main () method ?
  1. A
    private
  2. B
    public
  3. C
    protected
  4. D
    none of the mentioned
Question 1028Single Answer
What happends if constructor of Class A is made private ?
  1. A
    Any class can istantiate objects of Class A
  2. B
    Objects of class A can be instantiated only within the class where it is declared
  3. C
    Inherited class can instantiate object of class A
  4. D
    classes within the same package as class A can instantiate objects of class A
Question 1029Single Answer
Is Python case sensitive when dealing with identifiersa
  1. A
    yes
  2. B
    no 
  3. C
    machine dependent
  4. D
    none of the mentioned
Question 1030Single Answer
What is the maximum possible length of an identifier-
  1. A
    31 characters
  2. B
    63 characters
  3. C
    79 characters
  4. D
    none of the mentioned  
Question 1031Single Answer
In a spreadsheet program, the _______ contains related work sheets and documents ?
  1. A
    workbook
  2. B
    column
  3. C
    cell
  4. D
    formula
Question 1032Single Answer
Who developed the Python language
  1. A
    Zim Den
  2. B
    Guido van Rossum
  3. C
    Niene Stom
  4. D
    Wick van Roosum
Question 1033Single Answer
Which one of the following is the correct extension of the Python file -
  1. A
    py
  2. B
    python
  3. C
    p
  4. D
    None of these
Question 1034Single Answer
What is the method inside the class in Python language
  1. A
    Object
  2. B
    Function
  3. C
    Attribute 
  4. D
    Argument       
  5. E
    Argument       
Question 1035Single Answer
Which of the following declarations is incorrect -
  1. A
    _X = 2
  2. B
    x = 3
  3. C
    _xyx_ = 5
  4. D
    None of these
Question 1036Single Answer
Why does the name of local variables start with an underscore discouraged -
  1. A
    To identify the variable
  2. B
    It confuses the interpreter
  3. C
    It indicates a private variable of a class
  4. D
    None of these
Question 1037Single Answer
Which of the following statements is correct for variable names in Python language -
  1. A
    All variable names must begin with an underscore
  2. B
    Unlimited length
  3. C
    The variable name length is a maximum of 2
  4. D
    All of the above
Question 1038Single Answer
Which of the following declarations is incorrect in python language -
  1. A
    xyzp = 5,000,000
  2. B
    xyzp = 5000 6000 7000, 8000
  3. C
    x,y,z,p = 5000,6000,7000,8000
  4. D
    xy_z_p = 5,000,000      
Question 1039Single Answer
Which of the following preecedence order is correct in Python -
  1. A
    Parenthese, Exponential, Multiplication, Division, Addition, Substraction
  2. B
    Multiplication, Division, Addition, Subtraction, parentheses, Exponential
  3. C
    Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. D
    Exponential, Parentheses, Multiplication, Division, Addition, Subtraction
Question 1040Single Answer
Study the following program :
x = 1
while True : if x%5 ==0:
break
print (x)
x + = 1
What will be the output of this code
  1. A
    error
  2. B
    21
  3. C
    0 3 1
  4. D
    None of these
Question 1041Single Answer
Which one of the following syntaxes is the correct syntax to read from a simple text file stored in "d:\java (a)txt",”r”)
  1. A
    Infile = open ("d:\java(a)txt',"I")
  2. B
    Infile = open(file="d:\jav(a)txt", "r")
  3. C
    Infile = open("d:jav(a)txt","r")
  4. D
    Infile = open.file("d:\java(a)txt","r")
Question 1042Single Answer
Study the following function :
import math
abs(math.sqrt(36))
What will be th output of this code -
  1. A
    Error
  2. B
    - 6
  3. C
    6
  4. D
    6.0    
Question 1043Single Answer
The output to execute string.ascii...........letters can also be obtained from :
  1. A
    character    
  2. B
    ascii_lowercase_string.digits
  3. C
    lowercase_string.upercase
  4. D
    ascii lowercase +string.ascii_upercase  
Question 1044Single Answer
Study the following statements :
>>>print(ord('h')-ord('z'))
What will be the output of this statement
  1. A
    18
  2. B
    -18
  3. C
    17
  4. D
    - 17   
Question 1045Single Answer
What will be the output of the following Python code
x=['ab', 'cd']
for i in x:
i.upper()
print(x)
  1. A
    ['ab', 'cd']
  2. B
    ['AB', 'CD']
  3. C
    [None, None]
  4. D
    none of the mentioned         
Question 1046Single Answer
What will be the output of the following Python code -
x=['ab','cd']
for i in x:
x.append(i.upper() )
print(x)
  1. A
    ['AB', 'CD' ]
  2. B
    ['ab', 'cd', 'AB', 'CD' ]
  3. C
    ['ab', 'cd']
  4. D
    none of the mentioned
Question 1047Single Answer
What will be the output of the following Python code -
i = 1
while True: if i%3 == 0
break
print (i)
i + = 1
  1. A
    1 2
  2. B
    1 2 3
  3. C
    error
  4. D
    none of the mentioned
Question 1048Single Answer
What will be the output of the following Python code -
i = 1
while True:
if i%007==0:
break
print(i)
i+=1
  1. A
    1 2 3 4 5 6
  2. B
    1 2 3 4 5 6 7
  3. C
    error
  4. D
    none of the mentioned
Question 1049Single Answer
What will be the ouput of the following Python code -
i = 5
While True:
if i %0011==0:
break
print(i)
i+=1
  1. A
    5 6 7 8 9 10
  2. B
    5 6 7 8
  3. C
    56
  4. D
    error
Question 1050Single Answer
What will be the output of the following Python code -
i = 5
While True:
if i %009==0:
break
print(i)
it=1
  1. A
    5 6 7 8
  2. B
    5 6 7 8 9
  3. C
    5 6 7 8 9 10 11 12 13 14 15......
  4. D
    error
Important Questions Package

ISRO Computer Science Exam Online Question Bank Package

Buy ISRO Computer Science Important Questions, MCQ, question answer in Hindi & English. It will help you to score high marks in ISRO Computer Science question bank 2026 in Online, PDF & Print study material.

+ Free Monthly Current Affairs, GK & more PDF Download
Sr.Package NameAmount
1.ISRO Computer Science Exam - English
Description : 1000 Question with Answer
₹101 [₹500]
2.ISRO Computer Science Exam - English
Description : 1750 Question with Answer
₹141 [₹500]
3.ISRO Computer Science Exam - English
Description : 1000 Question & Answer Download in PDF (Send by Email)
₹151 [₹450]
4.ISRO Computer Science Exam Question Bank Book - English
Description : 1000 Question with Answer (Printed Material)
₹390 [₹600]
← PrevPage 3 of 4Next →
Back to Exam