299 Computer Science questions asked in CIL MT previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
Which of the following statements is INCORRECT with respect to pointers declared in the following 'C' language code?
void main(){
int a[10], *p, *q;
p=&a[5];
q=&a[7];
}
Considering the process details given in the following table, what will be the completion order of the processes under the policies FCFS and RR (with CPU quantum of 2 time units)?
Process ID – CPU Burst – Arrival Time
P1 – 5 – 3
P2 – 7 – 2
P3 – 5 – 0
Which of the following represents the language over the set A = {a, b} consisting of all words beginning with one or more a's and followed by the same number of b's?
If D = {R1, R2} is a decomposition of R, and F is the set of functional dependencies on R, then which of the following ensures that the decomposition D is lossless (nonadditive)?
A flip-flop has a 20-nano second delay from the time its CP input goes from 1 to 0 to the time the output is complimented. What is the maximum delay in a 16-bit binary ripple counter that uses these flip-flops?
Let L be the language on A = {a, b, c} which consists of all words of the form w = aʳbˢcᵗ where r, s, t > 0. Which of the following is the valid regular expression 'r' such that L = L(r)?
The listing of nodes after applying the preorder traversal over the following binary tree is:
A is the root. A has left child B and right child C. B has left child D and right child E. C has left child F and right child G. D has children H (left) and I (right). E has children J (left) and K (right). F has a single left child L.
AA, B, D, H, I, E, J, K, C, F, G, L
BH, D, I, B, J, E, K, A, L, F, C, G
CH, I, D, J, K, E, B, L, F, G, C, A
DA, B, D, H, I, E, J, K, C, F, L, G
Show answerHide answer
Correct answer: (D) A, B, D, H, I, E, J, K, C, F, L, G
Consider the following relation schema R along with the tuples.
Employee(name, salary) = {<e1, 10000>, <e2, 5000>, <e3, 2500>, <e4, 7500>, <e5, 8900>, <e6, 9800>}
What is the output of following SQL query?
SELECT name, MAX(salary) FROM Employee WHERE salary < (SELECT MAX(salary) FROM Employee);
Which of the following relationships holds for non-random-access memory, where Tₙ = average time to read or write n bits, Tₐ = average access time, n = number of bits and r = transfer rate in bits per second?
Consider an information exchange scenario where Anthony is the sender and Bond is the intended recipient of the data. Match the following appropriately.
List I: I) Message authentication, II) Message confidentiality, III) Message integrity, IV) Message non-repudiation
List II: A) Anthony must not be able to deny sending a message that he or she, in fact, did send; B) The message must arrive at the Bond's side exactly as it was sent; C) Bond needs to be sure of Anthony's identity and that an imposter has not sent the message; D) The transmitted message must make sense to only Bond, and to all others it must be garbage
AI – C, II – B, III – D, IV – A
BI – C, II – D, III – A, IV – B
CI – C, II – D, III – B, IV – A
DI – A, II – D, III – B, IV – C
Show answerHide answer
Correct answer: (C) I – C, II – D, III – B, IV – A
Consider the process details given in the following table.
Process ID – CPU Burst – Arrival Time – Priority
P0 – 3 – 0 – 1
P1 – 9 – 2 – 4
P2 – 7 – 4 – 3
P3 – 6 – 3 – 2
A new pre-emptive scheduling algorithm is proposed, i.e., the Longest Remaining Time Next (LRTN), wherein ties are broken by giving priority to the process with the highest priority. Calculate the following.
i. Turnaround time for Process P2
ii. Response time for Process P3
Which of the following operators can be used if a portion of a given bit patterns needs to be copied to a new word, while the remainder of the new word is filled with 0s?
Let each process Pᵢ, i=1 to 7 executes the following code.
repeat
P(mutex);
CS
V(mutex);
forever
The process P₈ executes the following code:
repeat
V(mutex);
CS
V(mutex);
forever
What is the maximum number of processes that can be present in the critical section at any point of time? Given that the initial value of binary semaphore variable "mutex" is 1.
State TRUE or FALSE for the following.
(i) A sine wave with a phase of 180° starts at time 0 with a zero amplitude. The amplitude is decreasing.
(ii) If a signal changes instantaneously, its frequency is zero.
(iii) In bipolar encoding, we use three voltage levels: positive, negative and zero.
(iv) Infrared signals can be used for short-range communication in a closed area using ground propagation.
Consider the characters and their frequency counts given in the following table.
Character: a, b, c, d, e, f
Frequency (in 1000s): 24, 16, 12, 20, 8, 4
Using the Huffman coding technique, which of the following is the valid code for character 'c'?
A block of addresses is granted to a small organization. If one of the addresses is 210.32.64.79/26, then what will be the values of the following?
(i) First address
(ii) Last address
(iii) Total number of addresses
A(i) 210.32.64.64, (ii) 210.32.64.127, (iii) 64
B(i) 210.32.64.64, (ii) 210.32.64.255, (iii) 32
C(i) 210.32.64.79, (ii) 210.32.64.255, (iii) 64
D(i) 210.32.64.64, (ii) 210.32.64.79, (iii) 128
Show answerHide answer
Correct answer: (A) (i) 210.32.64.64, (ii) 210.32.64.127, (iii) 64
A ______ takes a directed ______ graph G and produces a linear ordering of all its vertices such that for every directed edge <v, w> in G, the vertex v comes before the vertex w in the ordering.
Which of the following statements is TRUE for the function prototype declaration given below?
int *(*P) (char *Q[]);
AP is a function that accepts an argument which is a character array and returns a pointer to an integer quantity.
BP is a function that accepts an argument which is a pointer to a character array and returns a pointer to an integer quantity.
CP is a pointer to a function that accepts an argument which is an array of character pointers, and returns a pointer to an integer quantity.
DP is a pointer to function that accepts an argument which is a character array and returns a pointer to an integer quantity.
Show answerHide answer
Correct answer: (C) P is a pointer to a function that accepts an argument which is an array of character pointers, and returns a pointer to an integer quantity.
Consider the following segment of codes related to process creation. How many times the message "child process created" will be printed?
#include <stdio.h>
void main(){
fork(); fork(); fork();
printf("child process created");
}
Which of the following statements about the following binary tree is FALSE?
A is the root. A has left child B and right child C. B has left child D and right child E. C has left child F and right child G. D has children H (left) and I (right). E has children J (left) and K (right). F has a single left child L.
Consider a cache memory organization with m lines in which the cache is divided into v sets, each of which consists of k lines. The set associative mapping technique reduces to direct mapping when:
Consider a memory unit of size 96 K × 16, where the first component represents the total number of words and the second component represents the number of bits per word. What will be the number of address lines and input-output data lines?
A16 address lines, 7 data lines
B7 address lines, 16 data lines
C17 address lines, 16 data lines
D16 address lines, 17 data lines
Show answerHide answer
Correct answer: (C) 17 address lines, 16 data lines
A _______ is a pictorial depiction of the schema of a database that shows the relations in the database, their attributes, and primary keys and foreign keys.
Arelational query languages
Brelational algebra
Cflow diagram
Dschema diagram
Show answerHide answer
Correct answer: (D) schema diagram
How to use these CIL MT Computer Science questions
Every question here was asked in a real CIL MT paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full CIL MT papers as timed tests to check your speed under exam conditions.