Showing posts with label ISRO 2018. Show all posts
Showing posts with label ISRO 2018. Show all posts

Sunday, 22 April 2018

isro cs question paper solution 2018 Q5 Set-A

Question 5

Consider the following table in a relational database

Last Name Rank Room Shift
Smith Manager 234 Morning
Jones Custodian 33 Afternoon
Smith Custodian 33 Evening
Doe Clerical 222 Morning

According to the data shown in the table, which of the following could be a candidate key of the table?

(a) { Last Name}
(b) { Room }
(c) { Shift }
(d) { Room, Shift }

Correct answer:  (d) { Room, Shift }

Explanation: 
Candidate key is the attribute or set of attribute which uniquely identifies the tuple.  

Smith not uniquely identifies the tuple: as Smith-> manager (Rank) and Smith-> Custodian (Rank).
Similarly, Room gives different Shift value for key 33 (Room).
Similarly, Shift gives different Room value for key Morning (Shift).

So, after combining the { Room, Shift } as a candidate key to uniquely identify the tuples.

isro cs question paper solution 2018 Q4 Set-A

❔ The following C program

main()
{
fork(); fork(); printf("yes");
}

If we execute this core segment, how many times string yes will be printed ?

(a) only once
(b) 2 times
(c) 4 times
(d) 8 times

Correct answer: (c) 4 times  ==>  two fork call will produce total  ((2^2) -1) = 3  new processes and the one main(initial) process  == 4 process after 2nd fork call.

lets say Starting process is P1 then after fork() call new process P2 generated,

Now, two processes are running P1 and P2. After second fork call the P1, P2 produces two new process P3 and P4. So total processes is 4. So, each process now executes the statement - "printf("yes")"

isro cs question paper solution 2018 Q3 Set-A

❔ If a variable can take 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 answers are to the base 2, and [logN] means the floor of logN)

(a) [log N] +1 bits
(b) [log(N-1)]+1 bits
(c) [log(N+1)]+1 bits
(d) None of the above

Correct Answer is (a) [log N] +1 bits

Consider the number 128

then, we requires the log[128] +1 == 8 bits required.

for, n=128, the option (b) doesn't satisfy ==> log (floor(128-1)) +1 = between(6 to 7)+1=6+1= 7

now take 127 then option (c) doesn't not satisfy==> log[127+1] +1 == 8 (NOT COORECT, to represent the 127 we need 7 bits only)

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts