ISRO Scientist or Engineer Computer Science 2015

Instructions

For the following questions answer them individually

Question 71

Consider the following program fragment
i = 6720; j = 4;
while((i % j) == 0)
{
$$i= \frac{i}{j}$$;
    j = j + 1;
}
on termination j will have the value

Video Solution
Question 72

Consider the following declaration,
int a, *b = &a, **c = &b;
the following program fragment
a=4;
**c=5;

Video Solution
Question 73

The output of the following program is
main( )
{
static int x[] = {1, 2, 3, 4, 5, 6, 7, 8};
int i;
for (i = 2; i < 6; ++i)
x[x[i]] = x[i);
for (i = 0; i < 8; ++i)
printf(*%d", x[i]);
}

Video Solution
Question 74

Which of the following has the compilation error in C?

Video Solution
Question 75

The for loop
for(i = 0; i < 10; ++i)
printf(%d", i&1); 9
prints

Video Solution
Question 76

Consider the following statements
# define hypotenuse(a, b) sqrt (a*a + b*b);
The macro call hypotenuse (a+2, b+3);

Video Solution
Question 77

In X=$$\frac{M+N \times O}{P \times Q}$$ how many one-address instructions are required to evaluate it?

Video Solution
Question 78

A decimal number has 64 digits. The number of bits needed for its equivalent binary representation is

Video Solution
Question 79

Consider the following C declaration
struct {
short s[5];
union {
float y;
long z;
ju;
}t;
Assume that objects of type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirementfor variable t, ignoring alignment considerations,is

Video Solution
Question 80

Consider the following code segment
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 andcall by reference, respectively?

Video Solution
cracku

Boost your Prep!

Download App