• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

ISRO CS 2015

Question 71

Which of the following has the compilation error in C?

  • int n = 17;

  • char c = 99;

  • float f = (float)99.32;

  • <include>

Question 72

The for loop
for (i=0; i<10; ++i)
printf("%d", i&1);
prints:
  • 0101010101
  • 0111111111
  • 0000000000
  • 1111111111

Question 73

Consider the following statements
#define hypotenuse (a, b) sqrt (a*a+b*b); 
The macro call hypotenuse(a+2,b+3);
  • Finds the hypotenuse of a triangle with sides a+2 and b+3
  • Finds the square root of (a+2)2 and (b+3)2
  • Is invalid
  • Find the square root of 3*a + 4*b + 5

Question 74

In X = (M + N x O)/(P x Q), how many one-address instructions are required to evaluate it?
  • 4
  • 6
  • 8
  • 10

Question 75

The decimal number has 64 digits.The number of bits needed for its equivalent binary representation is?
  • 200
  • 213
  • 246
  • 277

Question 76

Consider the following code fragment void foo(int x, int y) { x+=y; y+=x; } main() { int x=5.5; foo(x,x); } What is the final value of x in both call by value and call by reference, respectively?
  • 5 and 16
  • 5 and 12
  • 5 and 20
  • 12 and 20

Question 77

The correct syntax to write "Hi there" in Javascript is
  • jscript.write ("Hi There");
  • document.write ("Hi There");
  • print ("Hi There");
  • print.jscript ("Hi There");

Question 78

If n has 3, then the statement a[++n]=n++;
 

  • assigns 3 to a[5]
     

  • assigns 4 to a[5]
     

  • assigns 4 to a[4]
     

  • what is assigned is compiler dependent
     

Question 79

Consider the following C declaration 
 

struct (
short s[5];
union {
float y;
long z;
}u;
}t;


Assume that the objects of the type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment consideration, is
 

  • 22 bytes
     

  • 18 bytes
     

  • 14 bytes
     

  • 10 bytes
     

Question 80

A T-switch is used to
  • Control how messages are passed between computers
  • Echo every character that is received
  • Transmit characters one at a time
  • Rearrange the connections between computing equipments

There are 80 questions to complete.

Last Updated :
Take a part in the ongoing discussion