# Recent questions tagged isro2018 1
Consider the following program { int x=1; printf("%d",(*char(char*)&x)); } Assuming required header files are included and if the machine in which this program is executed is little endian, then the output will be 0 99999999 1 unpredictable
2
Consider the following declaration : structaddr { char city; char street; int pin; }; struct { char name; int gender; struct addr locate; } person, *kd = &person; Then *$(kd->name + 2)$ can be used instead of: $person.name+2$ $kd-> (name+2)$ $*((*kd).name+2)$ either $A)$ or $B)$ , not $C)$
3
If a variable can take only integral values from $0$ to $n$, where $n$ is an integer, then the variable can be represented as a bit-field whose width is $($the log in the answer are to the base $2$, and $\left \lceil \log_{}{n} \right \rceil$ ... $\left \lceil \log (n+1) \right \rceil + 1\text{ bits}$ None of the above
4
The following $C$ program: { fork(); fork(); printf("yes"); } If we execute this core segment, how many times the string yes will be printed? Only once 2 times 4 times 8 times
1 vote
5
Considering the following table in a relational database : \begin{array}{|c|c|c|c|} \hline \textbf{Last Name} & \textbf{Rank} & \textbf{Room} & \textbf{shift} \\ \hline \text{Smith} & \text{Manager} & \text{234} & \text{Morning} \\ \hline \text{Jones} & \text{ ... to the data shown in the table, which of the following could be a candidate key of the table? {Last Name} {Room} {Shift} {Room, Shift}
6
A data driven machine is one that executes an instruction if the needed data is available. The physical ordering of the code listing does not dictate the course of execution. Consider the following pseudo-code: Multiply $E$ by $0.5$ to get $F$ Add $A$ and $B$ to get $E$ Add $B$ with $0.5$ ... sequence of execution is valid? B, C, D, A, E C, B, E, A, D A, B, C, D, E E, D, C, B, A
7
Assume $A$ and $B$ are non-zero positive integers. The following code segment: while(A!=B){ if*(A> B) A -= B; else B -= A; } cout<<A; // printing the value of A Computes the $LCM$ of two numbers Divides the larger number by the smaller number Computes the $GCD$ of two numbers Finds the smaller of two numbers
1 vote
8
A language with string manipulation facilities uses the following operations. head$(s)$- returns the first character of the string $s$ tails$(s)$- returns all but the first character of the string $s$ concat$(s1, s2)$- concatenates string $s1$ with $s2.$ The output of concat(head$(s)$, head(tail(tail$(s)$))), where s is $acbc$ is: ab ba ac aa
9
In the diagram above, the inverter (NOT gate) and the AND-gates labeled $1$ and $2$ have delays of $9$, 10 and $12$ nanoseconds (ns), respectively. Wire delays are negligible. For certain values $a$ and $c$, together with certain transition of $b$, a glitch (spurious output) is ... , after which the output assumes its correct value. The duration of glitch is: $7$ $ns$ $9$ $ns$ $11$ $ns$ $13$ $ns$
10
Which of the following comparisons between static and dynamic type checking incorrect? Dynamic type checking slows down the execution Dynamic type checking offers more flexibility to the programmers In contrast to Static type checking, dynamic type checking may cause failure in runtime due to type errors Unlike static type checking dynamic type checking is done during compilation
11
________ can detect burst error of length less than or equal to degree of the polynomial and detects burst errors that affect odd number of bits. Hamming Code CRC VRC None of the above
1 vote
12
An array $A$ consists of $n$ integers in locations $A, A, \ldots A[n-1]$. It is required to shift the elements of the array cyclically to the left by $k$ places, where $1<=k<=(n-1)$. An incomplete algorithm for doing this in linear time, without using another array is given bellow. Complete the ...
13
The difference between a named pipe and a regular file in Unix is that Unlike a regular file, named pipe is a special file The data in a pipe is transient, unlike the content of a regular file Pipes forbid random accessing, while regular files do allow this. All of the above
14
A class of $30$ students occupy a classroom containing $5$ rows of seats, with $8$ seats in each row. If the students seat themselves at random, the probability that sixth seat in the fifth row will be empty is: $1/5$ $1/3$ $1/4$ $2/5$
15
The domain of the function log (log sin(x)) is: $0<x<$\pi2n$\pi$<$x$<$(2n+1)$\pi$, for$n$in$N$Empty set None of the above 3 votes 1 answer 16 The following paradigm can be used to find the solution of the problem in minimum time: Given a set of non-negative integer and a value$K$, determine if there is a subset of the given set with sum equal to$K$: Divide and Conquer Dynamic Programming Greedy Algorithm Branch and Bound 5 votes 3 answers 17$(G, *)$is an abelian group. Then$x= x^{^{-1}}$for any x belonging to$Gx=x^{^{2}}$for any x belonging to$G\left( x*y \right )^{2}$=$x^{^{2}}*y^{^{2}}$, for any$x, y$belonging to$GG$is of finite order 3 votes 1 answer 18 Consider the following C code segment: #include <stdio.h> main() { int i, j, x; scanf("%d", &x); i=1; j=1; while (i<10) { j =j*i; i= i+1; if(i==x) break; } } For the program fragment above, which of the following statements about the variables i and j must be true after execution of this program? ...$\wedge(i=x))(j=9!)\wedge$(i\geqslant$10$))$\vee((j=(x-1)!) $\wedge$ (i=x))$1 vote 4 answers 19 Given$\sqrt{224_{r}}$=$13$_{r}$ the value of radix $r$ is $10$ $8$ $6$ $5$
20
Determine the number of page faults when references to pages occur in the order $1,2,4,5,2,1,2,4.$ Assume that the main memory can accommodate $3$ pages and the main memory already has the pages $1$ and $2,$ with page $1$ brought earlier than page $2.$ (assume LRU i.e., Least-Recently-Used algorithm is applied) $3$ $4$ $5$ None of the above
21
Consider a system having $m$ resources of the same type. These resources are shared by $3$ processes $A, B, C,$ which have peak time demands of $3, 4, 6$ respectively. The minimum value of $m$ that ensures that deadlock will never occur is: $11$ $12$ $13$ $14$
22
A computer has $1000K$ of main memory. The jobs arrive and finish in the following sequence. Job $1$ requiring $200$ $K$ arrives Job $2$ requiring $350$ $K$ arrives Job $3$ requiring $300$ $K$ arrives Job $1$ finishes Job $4$ requiring $120$ $K$ ... $K$ arrives Among best fit and first fit, which performs better for this sequence? First fit Best fit Both perform the same None of the above
23
Disk requests come to a disk driver for cylinders in the order $10$, $22$, $20$, $2$, $40$, $6$ and $38$ at a time when the disk drive is reading from cylinder $20$. The seek time is $6$ ms/cylinder. The total seek time, if the disk arm scheduling algorithms is first-come-first-served is $360$ $850$ $900$ None of the above
24
Choose the correct statement - $A=\{a^nb^n \mid n= 1, 2, 3, \ldots\}$ is a regular language The set $B$, consisting of all strings made up of only $a's$ and $b's$ having equal number of $a's$ and $bs$ defines a regular language $L(A^*B)\cap B$ gives the set $A$ None of the above
25
$CFG$ (Context Free Grammar) is not closed under: Union Complementation Kleene star Product
26
The $FSM$ (Finite State Machine) machine pictured in the figure above Complements a given bit pattern Finds $2's$ complement of a given bit pattern Increments a given bit pattern by $1$ Changes the sign bit
27
A $CFG$ (Context Free Grammar) is said to be in Chomsky Normal Form $(CNF)$, if all the productions are of the form A$\to$ BC or A$\to$ a. Let $G$ be a $CFG$ in $CNF$. To derive a string of terminals of length x, the number of products to be used is: $2x-1$ $2x$ $2x+1$ $2^{x}$
1 vote