• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

ISRO CS 2020

Question 21

What is the complexity of the following code ?
sum = 0;
  for (i = 1; i <= n; i*= 2)
    for(j = 1; j <= n; j++)
      sum++; 
Which of the following is not a valid string ?
  • Ο(n2)
  • Ο(n log n)
  • Ο(n)
  • Ο(n log n log n)

Question 22

In the following procedure
Integer procedure P(X, Y);
Integer X,Y:
value x;
begin
  K = 5;
  L = 8;
  P = x + y;
end 
X is called by value and Y is called by name. If the procedure were invoked by the following program fragment
K = 0;
  L = 0;
  Z = P(K, L); 
then the value Z would be set equal to
  • 5
  • 8
  • 13
  • 0

Question 23

Consider product of three matrices M1, M2 and M3 having w rows and x columns, x rows and y columns, and y rows and z columns. Under what condition will it take less time to compute the product as (M1M2)M3 than to compute M1(M2M3) ?
  • Always take the same time
  • (1/x + 1/z) < (1/w + 1/y)
  • x > y
  • (w + x) > (y + z)

Question 24

A new flip flop with inputs X and Y, has the following property. Which of the following expresses the next state in terms of X, Y, current state ?
  • X\'Q\' + Y\'Q
  • X\'Q + Y\'Q\'
  • XQ\' + YQ
  • XQ\' + Y\'Q

Question 25

What is the output of the following ‘c’ code assuming it runs on a byte addressed little endian machine?
C
#include <stdio.h>
int main( )
 {
   int x; char *ptr;
   x = 622,100,101;
   printf(\"%d\", (*(char *)&x) * (x % 3));
   return 0;
 } 
  • 622
  • 311
  • 22
  • 110

Question 26

What is the output in a 32 bit machine with 32 bit compiler ?
C
#include <stdio.h>

rer(int **ptr2, int **ptr1)
 {
  int* ii;
  ii = *ptr2;
  *ptr2 = *ptr1;
  *ptr1 = ii;
  **ptr1 *= **ptr2;
  **ptr2 += **ptr1;
 }
void main( )
 {
   int var1 = 5, var2 = 10;
   int *ptr1 = &var1, *ptr2 = &var2;
   rer(&ptr1, &ptr2);
   printf(%d %d , var2, var1);
 } 
  • 60 70
  • 50 50
  • 50 60
  • 60 50

Question 27

Which of the following is an efficient method of cache updating ?
  • Snoopy writes
  • Write through
  • Write within
  • Buffered write

Question 28

In a columnar transposition cipher, the plain text is “the tomato is a plant in the night shade family”, keyword is “TOMATO”. The cipher text is
  • “TINESAX / EOAHTFX / HTLTHEY / MAIIAIX / TAPNGDL / OSTNHMX”
  • “TINESAX / EOAHTFX / MAIIAIX / HTLTHEY / TAPNGDL / OSTNHMX”
  • “TINESAX / EOAHTFX / HTLTHEY / MAIIAIX / OSTNHMX / TAPNGDL”
  • “EOAHTFX / TINESAX / HTLTHEY / MAIIAIX / TAPNGDL / OSTNHMX”

Question 29

Avalanche effect in cryptography refers
  • Large changes in cipher text when the keyword is changed minimally
  • Large changes in cipher text when the plain text is changed
  • Large impact of keyword change to length of the cipher text
  • None of the above

Question 30

A magnetic disk has 100 cylinders, each with 10 tracks of 10 sectors. If each sector contains 128 Bytes, what is the maximum capacity of the disk in kilobytes ?
  • 1,280,000
  • 1280
  • 1250
  • 128,000

There are 80 questions to complete.

Last Updated :
Take a part in the ongoing discussion