# Answers by gatecse

1 vote
1
Consider the following $\text{ANSI C}$ program. #include <stdio.h> int main() { int arr; int i, j; for (i=0; i<4; i++) ​​​​​​{ for (j=0; j<5; j++) { arr[i][j] = 10 * i + j; } } printf(“%d”, *(arr+9)); return 0; } What is the output of the above program? $14$ $20$ $24$ $30$
2 votes
2
The format of the single-precision floating point representation of a real number as per the $\text{IEEE 754}$ ... $=00000000$ and mantissa $=0000000000000000000000001$ exponent $=00000001$ and mantissa $=0000000000000000000000000$ exponent $=00000001$ and mantissa $=0000000000000000000000001$
2 votes
3
Consider the following $\text{ANSI C}$ function: int SimpleFunction(int Y[], int n, int x) { int total = Y, loopIndex; for (loopIndex=1; loopIndex<=n-1; loopIndex++) total=x*total +Y[loopIndex]; return total; } Let $\textsf{Z}$ be an array of $10$ elements with $\textsf{Z}[i]=1$, for all $i$ such that $0 \leq i \leq 9$. The value returned by $\textsf{SimpleFunction(Z},10,2)$ is __________
2 votes
4
Consider the following statements $S1$ and $S2$ about the relational data model: $S1$: A relation scheme can have at most one foreign key. $S2$: A foreign key in a relation scheme $R$ cannot be used to refer to tuples of $R.$ Which one of the following choices is correct? Both $S1$ and $S2$ are true $S1$ is true and $S2$ is false $S1$ is false and $S2$ is true Both $S1$ and $S2$ are false
15 votes
5
Consider the following $\text{ANSI C}$ program: int main () { Integer x; return 0; } Which one of the following phases in a seven-phase $C$ compiler will throw an error? Lexical analyzer Syntax analyzer Semantic analyzer Machine dependent optimizer
5 votes
6
If the numerical value of a $2$-byte unsigned integer on a little endian computer is $255$ more than that on a big endian computer, which of the following choices represent(s) the unsigned integer on a little endian computer? $0\text{x}6665$ $0\text{x} 0001$ $0\text{x} 4243$ $0\text{x} 0100$