Consider the following code: int f(int k)
{
static int i = 100;
int l;
if (i == k)
{
printf("something");
l= f(i);
return 0;
}
else return 0;
}
Which one of the following is TRUE?
the function returns 0 when j = 1000.
the function prints the string something for all values of j.
the function returns 0 for all values of j.
the function will exhaust the runtime stack or run into an infinite loop when j = 100
Answer: Option D.
Which of the following is feature of friend classes?
If class A is a friend of class B, class B is not automatically a friend of class A.
If class A is a friend of class B, and class B is a friend of class C, class A is not automatically a friend of class C.
None of these
Both (a) and (b)
Answer: Option D.
Which of the following is not a characteristic of modern DBMS?
Real world entity
More redundancy
Isolation of data and applications
Consistency
Answer: Option B.
What is a chunk of memory called ?
Page
Sector
Frame
None of these
Answer: Option C.
Give the output of the following program:
#include<iostream.h>
int main()
{
long number = 5572331, result=0;
do
{
result * = 10;
int digit = number% 10;
result += digit ;
number / = 10;
} while (number>0);
cout<< result ;
return 0;
}