Q1: Which of the following is not a solution representation in a genetic algorithm?
1. Binary valued
2. Real valued
3. Permutation
4. Combinations
(a) Binary valued
(b) Real valued
(c) Permutation
(d) Combinations
Ans: D
Sol: The correct answer is Combinations
In a genetic algorithm, solution representation refers to how the potential solutions (individuals in the population) are encoded. The given options can be categorized as follows:
So, the correct answer is 4) Combinations.
Q2: Match List I with List II
Choose the correct answer from the options given below:
(a) A - III, B - I, C - II, D - IV
(b) A - II, B - I, C - III, D - IV
(c) A - III, B - IV, C - I, D - II
(d) A - II, B - III, C - IV, D - I
Ans: C
Sol: The correct answer is A - III, B - IV, C - I, D - II
A - Parallel Fast Fourier Transform (FFT):
B - Iterative Fast Fourier Transform (FFT):
C - Evaluation of polynomial at n points by Horner method:
D - Product of two polynomials that are represented in point value form:
That's why the correct answer is option 3.
Q3: The following table shows the time between failures for a software:
The reliability of the system for one hour operation assuming an exponential model is-
(a)
(b)
(c)
(d)
Ans: C
Sol: The correct answer is
The reliability of a system in the context of reliability engineering is often modeled using the exponential distribution. The exponential reliability function is given by:
where:
In this case, you are given the time between failures for the software:
To find the failure rate , you can use the formula:
Mean time between failures (MTBF)is calculated as the average of the time between failures:
Now, the failure rate () is:
Substitute this into the reliability function:
For one hour of operation (), the reliability becomes:
So, the correct answer is:
Therefore, the correct option is:
Q4: Given below are two statements:
Which of the following concurrency control protocol ensures both conflict serializability and freedom from deadlock?
Statement I: Two phase locking
Statement II: Timestamp ordering
In the light of the above statements, choose the most appropriate answer from the options given below:
(a) Both Statement I and Statement II are correct
(b) Both Statement I and Statement II are incorrect
(c) Statement I is correct but Statement II is incorrect
(d) Statement I is incorrect but Statement II is correct
Ans: D
Sol: The correct answer is Statement I is incorrect but Statement II is correct
Two-phase locking (2PL):
Timestamp-based protocol:
Thomas Write Rule and Basic Timestamp Ordering. The one that provides both conflict serializability and freedom from deadlock is the Basic Timestamp Ordering.
So, Statement I is incorrect because Two-phase locking (2PL) does not ensure freedom from deadlock, and Statement II is correct because Timestamp-based protocol ensures both conflict serializability and freedom from deadlock.
Q5: The clipping process in computer graphics is used for
(a) Adding graphics
(b) Copying
(c) Zooming
(d) Removing objects and lines
Ans: D
Sol: The correct answer is Removing objects and lines
Clipping in computer graphics is the process of constraining the visibility of objects and lines within a defined view or volume, typically a rectangular window view. In simpler terms, it means cutting off areas of geometric shapes that lie outside the viewing volume.
This process is incredibly crucial in 2D and 3D graphics alike for several reasons:
The primary types of clipping include Point Clipping, Line Clipping, Area Clipping (or Polygon Clipping), and Text Clipping. Each type has specific algorithms that work most efficiently for their respective tasks. The most well-known of these are the Cohen-Sutherland and the Liang-Barsky line-clipping algorithms.
Q6: Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: I/O protection is ensured by a hardware trap
Reason R: I/O interrupt caused by the condition like I/O completion and device malfunction occurring within the I/O devices
In the light of the above statements, choose the correct answer from the options given below.
(a) Both A and R are true and R is the correct of A
(b) Both A and R are true but R is NOT the correct of A
(c) A is true but R is false
(d) A is false but R is true
Ans: D
Sol: The correct answer is A is false but R is true
Assertion A:
Reason R:
Q7: Let R = {x : x ∈ N, x is multiple of 3 and x ≤ 100} and S = {x : x ∈ N, x is a multiple of 5 and x < 100}. What is the number of elements in (R ∩ S) × (S ∩ R)?
(a) 36
(b) 33
(c) 20
(d) 6
Ans: A
Sol: The correct answer 36
So, the answer is: 36
Q8: Given below are two statements:
Statement I: Fuzzifier is a part of a fuzzy system
Statement II: Inference engine is a part of fuzzy system
In the light of the above statements, choose the most appropriate answer from the options given below.
(a) Both Statement I and Statement II are correct
(b) Both Statement I and Statement II are incorrect
(c) Statement I is correct but Statement II is incorrect
(d) Statement I is incorrect but Statement II is correct
Ans: A
Sol: The correct answer is Both Statement I and Statement II are correct.
"Fuzzy" in this context refers to a systems or control method that smooths the harsh transitions of binary (on-off, true-false, yes-no) responses to more human-like spectrums of response. Fuzzy systems deal with degrees of truth, as opposed to binary logic which deals with true or false (1 or 0, on or off).
Fuzzifier:
Inference Engine:
Both Fuzzifier and Inference Engine are indeed components of a fuzzy system, and they are pivotal in making any fuzzy logic model work. So, statement I and statement II are correct.
Q9: What will be the output of the following code?
#include <stdio.h>
int main ( ) {
int a, b, c;
a = 0x10;, b = 010;, c = a + b;
printf ("%d", c);
return 0;
}
(a) 20
(b) 24
(c) Garbage
(d) error
Ans: B
Sol: The correct answer is 24
:
#include
int main() {
int a, b, c;
a = 0x10; // Hexadecimal notation for 16
b = 010; // Octal notation for 8
c = a + b;
printf("%d", c);
return 0;
}
0x10 is a hexadecimal representation which is equivalent to 16 in decimal and 010 is an octal representation which is equivalent to 8 in decimal.
So, c = a + b calculates as c = 16 + 8.
Hence, the output will be 24.
Q10: What is the output of following code?
#include <stdio.h>
main ()
struct s1
{char * z;
int i;
struct s1 * p;
}
static struct s1 a [ ] = {
{"Nagpur", 1, a + 1}
{"Raipur', 2, a + 2}
{"Kanpur', 3, a}
}:
struct s1* ptr = a:
printf (%s %s %s\n", a[0].z, ptr → z, a[2].p → z);
}
(a) Nagpur Raipur Kanpur
(b) Nagpur Nagpur Nagpur
(c) Kanpur Kanpur Kanpur
(d) Error
Ans: B
Sol: The correct answer is Nagpur Nagpur Nagpur
In C programming, a structure (struct) is a user-defined data type that groups related variables of different data types together. A struct is used for packaging data where each element, known as a member, can have a different type.
#include
typedef struct s1 {
char * z;
int i;
struct s1 * p;
} s1;
int main() {
static s1 a[3] = {{"Nagpur", 1, a + 1}, {"Raipur", 2, a + 2}, {"Kanpur", 3, a}};
s1* ptr = a;
printf("%s %s %s\n", a[0].z, ptr -> z, a[2].p -> z);
return 0;
}
a[0].z refers to the string "Nagpur", which is the z value of the first structure.
ptr -> z also points to "Nagpur" because ptr was initialized to point to the first structure in the array.
a[2].p -> z also gives "Nagpur" because p of the third structure was initialized to point to the first structure in the array.
Therefore, the output of the corrected version of the provided code would be: Nagpur Nagpur Nagpur
This means the correct option from the given choices is 2) Nagpur Nagpur Nagpur.
Q11: Match List I with List II
Choose the correct answer from the options given below:
(a) A - I, B - III, C - IV, D - II
(b) A - IV, B - III, C - II, D - I
(c) A - I, B - II, C - IV, D - III
(d) A - IV, B - II, C - III, D - I
Ans: B
Sol: The correct answer is A - IV, B - III, C - II, D - I
Q12: Consider a disk system with 100 cylinders. The request to access the cylinders occurs in the following sequence:
4, 34, 10, 7, 19, 73, 2, 15, 6, 20
Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first policy is used?
(a) 119 ms
(b) 120 ms
(c) 142 ms
(d) 146 ms
Ans: A
Sol: The correct answer is 119 ms
The Shortest Seek Time First (SSTF) Algorithm operates on the principle of servicing all requests in proximity to the current head location before moving further away. This strategy centralizes on serving requests that are nearest to the present location of the head, with the rationale being that the distance traversed by the head increases with the number of cylinders, so the SSTF algorithm prioritizes pending requests that are closest to the current position of the head.
⇒ 50 - 2 = 48
⇒ 73 - 2 = 71
⇒ time taken to satisfy all requests = 48 + 71 = 119
Q13: Find the sum of all four digit numbers formed using the digits 1, 2, 4 and 6.
(a) 86,658
(b) 88,858
(c) 91,958
(d) 93,358
Ans: A
Sol: The correct answer is 86,658
We want to find the sum of all four-digit numbers that can be formed using the digits 1, 2, 4, and 6. Each distinct digit will occupy each place value (Thousands, Hundreds, Tens, and Units) the same number of times when we consider all possible permutations.
There are total 4! = 4*3*2*1 = 24 ways to permute 4 different digits in 4 places.
The sum of all 4-digit numbers can be found by calculating the sum for each of the 4 positions (Thousands, Hundreds, Tens, and Units), then summing those results.
For each position:
Now, we calculate the total sum taking into account the place value:
Adding those up, the total sum of all 4-digit numbers that can be made with the digits 1, 2, 4, and 6 is 78,000 + 7,800 + 780 + 78 = 86,658. So the answer is option 1) 86,658.
Q14: How will you free the memory allocated by the following program?
# include
#i nclude < stdio.h >
#define MAXROW 3
#define MAXCOL 4
int main()
{
int ** p, i, j;
p = (int **)malloc (MAXROW* size of (int*));
return 0:
}
(a) memfree (int p);
(b) dealloc (p);
(c) malloc (p, 0);
(d) free (p):
Ans: D
Sol: The correct answer is free(p);
The way to free the memory allocated by the given C program is option 4) free(p);.
The malloc function is used to dynamically allocate memory in the heap to store a 2D array (matrix) with MAXROW number of pointers to int.
#include
#include
#define MAXROW 3
#define MAXCOL 4
int main() {
int **p, i, j;
// Allocate memory for MAXROW pointers to int
p = (int **)malloc(MAXROW * sizeof(int*));
// Allocate memory for each row
for(i = 0; i < MAXROW; i++) {
p[i] = (int *)malloc(MAXCOL * sizeof(int));
}
// Free memory for each row
for(i = 0; i < MAXROW; i++) {
free(p[i]);
}
// Finally, free the memory for the pointers
free(p);
return 0;
}
The fixed version of the program allocates the memory for each row in the array and then frees it sequentially before at the end, releasing the memory used for the array of pointers itself.
Q15: If A = {4n + 2 | n is a natural number} and B = {3n | n is a natural number}. Which of the following is correct for A ⋂ B?
(a) {12n2 + 6n | n is a natural number}
(b) {24n - 12 | n is a natural number}
(c) {60n + 30 | n is a natural number}
(d) {12n - 6 | n is a natural number}
Ans: D
Sol: The correct answer is {12n - 6 | n is a natural number}
Set A generates numbers of the form 4n + 2, and set B generates numbers of the form 3n, both when n is a natural number. The intersection of the two sets will be numbers that can be generated by both formats.
Set A generates number:
n = 1, 2, 3, 4, ...
Set B generates number:
n = 1, 2, 3, 4, ...
A ⋂ B = (6, 10, 14, 18) ⋂ (3, 6, 9, 12, 15, 18)
A ⋂ B = (6, 18)
Upon closer inspection, the option 4) {12n - 6 | n is a natural number} can indeed generate the sequence of numbers that belong to both A and B.
This sequence starts with ... when n = 1, 12*1 - 6 = 6 when n = 2, 12*2 - 6 = 18 when n = 3, 12*3 - 6 = 30 and so on.
These are indeed the terms that are common to sets A and B.
So, the correct answer is indeed option 4) {12n - 6 | n is a natural number}.
Q16: The total cost of retrieving records in sorted order using an unclustered B+ tree is
(P-Average number of records per data page
N-Data pages
F-Ratio of the size of a data entry to the size of a data record)
(a) (F*N) + P
(b) (F + P) * N
(c) F*N*P
(d) F + P/N
Ans: A
Sol: The correct answer is (F *NP) + P
Definitions from the question:
P = Average number of records per data page
N = Total number of data pages
F = Ratio of the size of a data entry (in the index) to the size of a data record
Key Concept – Unclustered B+ Tree Access in Sorted Order:
When a B+ tree is unclustered, the data entries (in the B+ tree) are stored separately from the actual data records.
If we retrieve records in sorted order:
We scan the leaf level of the B+ tree in order (cheap)
But for each data entry, we must fetch the corresponding data record from its data page
Since the index is unclustered, the records are not stored together — leading to many random I/Os.
Now, consider that for each data record, on average, 1 I/O is needed to fetch it from its own data page.
But here’s the twist: if each data page holds P records, and there are N data pages, then:
Total number of records = P × N
Total number of data entries = F × P × N
(Because F is the ratio of data entry size to data record size, so F times more entries than full records)
Now, in worst-case sorted retrieval:
We need to follow the order of data entries in B+ tree
For each entry, we access the corresponding record on a data page
Since it's unclustered, this can lead to up to F × N page reads (each of F records per page leads to a new page I/O)
Finally, for each page we retrieve, we may have to read multiple records on it (P per page), hence the P factor.
Final formula:
Total cost = F ⋅ N + P
Correct Answer: (a) (F × N) + P
Q17: Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
A virtual memory system uses first-in first-out page replacement policy and allocates a fixed number of frames to a process
Assertion A: Increasing number of page frames allocated to a process sometimes increases the page fault rate.
Reason R: Some programs do not exhibit locality of reference.
In the light of the above statements, choose the correct answer from the options given below.
(a) Both A and R are true and R is the correct of A
(b) Both A and R are true but R is NOT the correct of A
(c) A is true but R is false
(d) A is false but R is true
Ans: B
Sol: The correct answer is Both A and R are true but R is NOT the correct of A
Assertion A is true because of the phenomenon known asBelady's Anomaly-
Reason R is also true, because some programs do not exhibit locality of reference.
However, R is not the correct of A. Belady's Anomaly isn't caused by a lack of locality of reference, rather it is related to the particular nuances of the replacement algorithm in question (in this case, FIFO). So while both statements are true, they aren't connected in the way the question implies. Hence the answer is option 2.
Q18: At a particular time of computation, the value of a counting semaphore is 7. Then 20 p operations and 'x' V operations were completed on this semaphore. If the final value of semaphore is 5. x will be
(a) 15
(b) 22
(c) 18
(d) 13
Ans: C
Sol: The correct answer is 18
A counting semaphore is a synchronization mechanism used in concurrent programming to control access to a shared resource. It maintains a counter that can be incremented or decremented, allowing a specified number of threads or processes to access the resource simultaneously. The semaphore helps prevent race conditions and ensures orderly access to shared resources in a multithreaded or multiprocess environment.
The current value of counting semaphore is 7. After performing 20P the value of counting semaphore becomes -13. Now 'n' V operations are to be performed, which makes the value of counting semaphore as 5.
The generated equation is like this: = -13 + n = 5
⇒ n = 5 + 13
⇒ n = 18
Q19: A processor chip is used for application in which 30% of execution time is spent on floating point addition. For the new model of the processor, the design team has come up with redesign of the floating point adder to make it twice as fast. What will be possible maximum speed up by this redesign?
(a) 2.0
(b) 1.06
(c) 1.18
(d) 2.5
Ans: C
Sol: The correct answer is 1.18
To answer this question, we can use Amdahl's law, which is used to find the maximum improvement to an overall system when only part of the system is improved. The formula is:
where:
In this problem, 30% of the execution time (or 0.30) is spent on floating point addition, so p = 0.30.
The floating point addition is being made twice as fast, so s = 2.
Let's plug these values into Amdahl's law to calculate the speedup.
Thus, a maximum speedup of 1.18 could be achieved by making the floating point addition twice as fast. Therefore, the correct answer is option 3) 1.18.
Q20: Which of the following transforms in 2 dimension is used to resize a 2-dimensional object?
(a) Translation
(b) Rotation
(c) Scaling
(d) Shearing
Ans: C
Sol: The correct answer is Scaling
Scaling:
Other Related Points
Translation:
Rotation:
Shearing:
Q21: A three dimensional array in C++ is declared as int A [a] [b] [c]. Consider that array elements are stored in row major order and indexing begins from 0. Here the address of an item at the location A [r] [s] [t] computed in terms of word length w of an integer is
(a) & A [0] [0] [0] + w (b*c*s + c*r + t)
(b) & A [0] [0] [0] + w (b*c*r* + c*s + t)
(c) & A [0] [0] [0] + w (a*b*r* + c*s + t)
(d) & A [0] [0] [0] + w (a*b*s + c*r + t)
Ans: B
Sol: The correct answer is & A [0] [0] [0] + w (b*c*r* + c*s + t)
In C++, for a 3-dimensional array declared as int A[a][b][c], the memory is allocated in a sequence such that it increases with 'c' first, then 'b', and finally 'a'. This is because the elements are stored in row-major order.
So, when we are trying to find the address of an element A[r][s][t]:
Therefore, the correct formula would be: & A[0][0][0] + w * (b*c*r + c*s + t)
So, the correct answer would be option 2: & A [0] [0] [0] + w (bcr + c*s + t)
Q22: Consider the following statements:
A. A database design is in BCNF if each member of the set of relation schemas that constitutes the design is in BCNF
B. A BCNF schema can have transitive dependency
C. It is always possible to obtain a 3NF design without sacrificing a lossless join
D. There are multivalued dependencies in 4NF
(a) A, B and C only
(b) B, C and D only
(c) A, B and D only
(d) A, C and D only
Ans: D
Sol: The correct answer is A, C and D only
A. A database design is in BCNF if each member of the set of relation schemas that constitutes the design is in BCNF.
B. A BCNF schema can have transitive dependency.
C. It is always possible to obtain a 3NF design without sacrificing a lossless join.
D. There are multivalued dependencies in 4NF.
Based on these s, we can see that only statements A, C and D are true. Therefore, the correct option using the provided choices is: A, C, and D only
Q23: Consider a popular sports news site. At a given moment, 20,000 concurrent users submit a request (a transaction, T) once every 2 minutes on average. Each transaction requires the webapp to download a new article that on average has 3k bytes in length. What is the throughput?
(a) 8 megabits per second
(b) 4 megabits per second
(c) 6 megabits per second
(d) 2 megabits per second
Ans: B
Sol: The correct answer is 4 megabits per second
First, we need to determine the amount of data transferred in one transaction.
The length of an average article is 3k bytes.
Next, let's calculate the total amount of data transferred in one minute.
For each transaction, we've determined that there are 24,000 bits.
So, the total amount of data transferred in one minute is 10,000 transactions * 24,000 bits/transaction = 240 x 106 bits.
Since this question asked for throughput in megabits per second, we need to convert this quantity.
So, the answer is: 4 megabits per second
Q24: A TCP server application is programmed to listen on port P on host S. A TCP client is connected to the TCP server over the network, Consider that while TCP connection is active the server is crashed and rebooted. Assume that the client does not use TCP keepalive timer. Which of the following behaviour/s is/are possible?
Statement I: The TCP application server on S can listen on P after reboot.
Statement II: If client sends a packet after the server reboot, it will receive the RST segment.
In the light of the above statements, choose the correct answer from the options given below.
(a) Both Statement I and Statement II are true
(b) Both Statement I and Statement II are false
(c) Statement I is true but Statement II is false
(d) Statement I is false but Statement II is true
Ans: A
Sol: The correct answer is Both Statement I and Statement II are true
Statement I:
Statement II:
Q25: Consider the following statements:
S1: LRU page replacement algorithm suffers from the belady's anomaly
S2: Shortest remaining time first scheduling may cause starvation
S3: Stack is shared by all threads in a process
(a) S1, S2 and S3 are true
(b) S1, S3 false and S2 is true
(c) S1, S2 are false and S3 is true
(d) S1, S2 and S3 are false
Ans: B
Sol: The correct answer is S1, S3 false and S2 is true
S1: LRU (Least Recently Used) page replacement algorithm suffers from belady's anomaly. False -
S2: Shortest remaining time first scheduling may cause starvations. True -
S3: Stack is shared by all threads in a process. False -
So, according to the given statements: S1: False S2: True S3: False
The appropriate choice is: 2) S1, S3 false and S2 is true.
Q26: Which of the following is used to determine the cost performance index?
(a) Budgeted cost of work performed - budget at completion
(b) Budgeted cost of work performed ÷ budget at completion
(c) Budgeted cost of work performed ÷ Actual cost of work performed
(d) Budgeted cost of work performed - Actual cost of work performed
Ans: C
Sol: The correct answer is Budgeted cost of work performed ÷ Actual cost of work performed
The Cost Performance Index (CPI) is a key performance indicator in project management, particularly in the context of earned value management. It is used to assess the efficiency of cost performance on a project. The formula for calculating CPI is:
Where:
So, the CPI is essentially a ratio that helps you understand how well the project is performing in terms of cost efficiency. If the CPI is greater than 1, it indicates that the project is under budget, which is generally a positive sign. On the other hand, if the CPI is less than 1, it suggests that the project is over budget.
Now, let's relate this to the given options:
This is the correct formula for calculating the Cost Performance Index (CPI) based on the above. It compares the budgeted cost of the work performed to the actual cost of the work performed. Therefore, option 3 is the correct choice for determining the Cost Performance Index.
Q27: Which is not a basic approach to the problem of conflict resolution in a production system?
(a) Assigning a preference based on the rule that matched
(b) Assigning a preference based the object that matched
(c) Assigning a preference based on the action that the matched rule would perform
(d) Assigning a preference based on the action that the matched object would perform
Ans: D
Sol: The correct answer is Assigning a preference based on the action that the matched object would perform
In the context of conflict resolution in a production system, different rules may be applicable or relevant to a given situation, and there could be conflicts when multiple rules are triggered. Resolving these conflicts involves deciding which rule should take precedence or have a higher priority.
Assigning a preference based on the rule that matched:
Assigning a preference based on the object that matched:
Assigning a preference based on the action that the matched rule would perform:
Assigning a preference based on the action that the matched object would perform:
In summary, assigning a preference based on the action that the matched object would perform (Option 4) is less common in the context of basic conflict resolution strategies in production systems. The more common approaches involve prioritizing rules, objects, or actions associated with the rules.
Q28: Let R (A, B, C, D, E, F) be a relational schema with following functional dependencies:
C → F, E → A, EC → D, A → B. Which of the following is a key for R?
(a) CD
(b) EC
(c) AE
(d) AC
Ans: B
Sol: The correct answer is EC
In order to find the key for a relational schema, we need to find a minimal set of attributes which can determine all other attributes. This is usually done by calculating the closure of each set of attributes.Given the functional dependencies:
Let's compute the closure of each candidate key:
So, the key for R is EC.
Q29: Consider the following statements about heap sort algorithm:
A. The MAX-HEAPIFY procedure which runs in O(log n) time, is the key to maintaining the max heap property
B. The BUILD-MAX-HEAP procedure, which runs in O(log n) time, produces max-heap from an unordered input array
C. The MAX-HEAP-INSERT, which runs in O(log n) time, implements the insertion operation
D. The HEAP-INCREASE-KEY procedure runs in O(log n) time, to set the key of new node of its correct value
Choose the correct answer from the options given below:
(a) A, B only
(b) A, C only
(c) B, D only
(d) A, B, C, D
Ans: B
Sol: The correct answer is A, C only
A. The MAX-HEAPIFY procedure which runs in O(lg n) time, is the key to maintaining the max heap property.
B. The BUILD-MAX-HEAP procedure, which runs in O(lg n) time, produces a max-heap from an unordered input array.
C. The MAX-HEAP-INSERT, which runs in O(lg n) time, implements the insertion operation.
D. The HEAP-INCREASE-KEY procedure runs in O(n lg n) time to set the key of a new node to its correct value.
Therefore, the correct answer is option 2) A, C only.
Q30: Consider the following statements about the software product line system:
Statement I: At the interaction level, components provide an operator display interface and an interface with the communication system used.
Statement II: At the I/O management level, components handle operator authentication, report generator and query manager.
In the light of the above statements, choose the most appropriate answer from the options given below.
(a) Both Statement I and Statement II are correct
(b) Both Statement I and Statement II are incorrect
(c) Statement I is correct but Statement II is incorrect
(d) Statement I is incorrect but Statement II is correct
Ans: A
Sol: The correct answer is Both Statement I and Statement II are correct
Statement I: "At the interaction level, components provide an operator display interface and an interface with the communication system used." -
So, Option 1) Both Statement I and Statement II are correct.
Q31: Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: The AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion
Reason R: A Red Black tree with n nodes has height that is greater than 2 log2 (n + 1) and the AVL tree with n nodes has height less than logΦ (√5 (n+2)) -2 (where Φ is golden ratio)
In the light of the above statements, choose the correct answer from the options given below.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct and R is NOT the correct explanation of A
(c) A is true but R is false
(d) A is false but R is true
Ans: C
Sol: The correct answer is A is true but R is false
Assertion A: "AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion."
Reason R: "A Red-Black tree with n nodes has a height that is greater than 2 log₂ (n + 1), and the AVL tree with n nodes has a height less than logΦ (√5 (n+2)) - 2 (where Φ is the golden ratio)."
Therefore, Assertion A is correct, but Reason R is incorrect. The correct answer is option 3: "A is true but R is false."
Q32: 256 Mb DRAM is organized as a 32M × 8 memory externally and as a 16K × 16K square array internally. Each row must be refreshed at least once every 50 milisecond to forestall loss of data; refreshing one row takes 100 nanoseconds. What fraction of the total memory bandwidth is lost to refresh cycles?
(a) 6.6%
(b) 3.3%
(c) 9.9%
(d) 4.3%
Ans: B
Sol: The correct answer is 3.3%
To calculate the fraction of total memory bandwidth lost to refresh cycles, we need to consider the time spent on refreshing compared to the total time available.
First, let's find out how many rows are there in the DRAM:
Now, let's calculate the time required to refresh all rows:
Now, let's find the time available for data access in one refresh cycle:
Finally, let's find the fraction of time lost to refresh cycles:
Now, let's compare this result with the given options:
The closest option is 3.3%, so the correct answer is: 2) 3.3%
Q33: Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: Validity checks real need of system users
Reason R: Completeness checks system user defined requirements.
In the light of the above statements, choose the correct answer from the options given below.
(a) Both A and R are true and R is the correct explanation of A
(b) Both A and R are true but R is NOT the correct explanation of A
(c) A is true but R is false
(d) A is false but R is true
Ans: B
Sol: The correct answer is Both A and R are true but R is NOT the correct of A
Q34: Given the basic E R diagram and relational model, which of the following is incorrect?
(a) An attribute of an entity can have more than one value
(b) An attribute of an entity can be composite
(c) In a row of relational table, an attribute can have more than one value
(d) In a row of a relational table, an attribute can have exactly one value or a NULL value
Ans: C
Sol: The correct answer is In a row of relational table, an attribute can have more than one value
Other Related Points
Q35: Match List I with List II
Choose the correct answer from the options given below:
(a) A - IV, B - I, C - III, D - II
(b) A - III, B - IV, C - II, D - I
(c) A - IV, B - III, C - II, D - I
(d) A - I, B - II, C - III, D - IV
Ans: C
Sol: The correct answer is A - IV, B - III, C - II, D - I
A. Expert system - IV. Mycin:
B. Fuzzy system - III. Inference engine:
C. Operator in genetic algorithm - II. Scramble:
D. Supervised technique - I. Decision tree:
Q36: In a multiuser operating system, 20 requests are made to use a particular resource per hour, on an average. The probability that no request is made in 45 minutes is
(a) e-15
(b) e-5
(c) 1 - e-5
(d) 1 - e-10
Ans: A
Sol: The correct answer is e-15:
To solve this problem, we can use the Poisson distribution, which is often used to model the number of events occurring in fixed intervals of time or space.
The Poisson distribution is given by the formula:
Where:
In this case, the average rate of requests per hour () is 20. We want to find the probability of no requests in 45 minutes. We can adjust the rate for the given time interval:
Now, let in the Poisson distribution formula to find the probability of no requests (
):
Therefore, the correct answer is:
Q37: Given below are two statements:
Statement I: subsystem models show logical grouping of objects into coherent subsystem
Statement II: State machine models show how objects change their states in response to events.
In the light of the above statements, choose the most appropriate answer from the options given below.
(a) Both Statement I and Statement II are correct
(b) Both Statement I and Statement II are incorrect
(c) Statement I is correct but Statement II is incorrect
(d) Statement I is incorrect but Statement II is correct
Ans: A
Sol: The correct answer is Both Statement I and Statement II are correct
Statement I: Subsystem models show logical grouping of objects into coherent subsystems.
Statement II: State machine models show how objects change their states in response to events.
Q38: How many integral solutions are there to x + y + z + w = 29, where x ≥ 1, y ≥ 2, z ≥ 3 and w ≥ 0?
(a) 2400
(b) 2600
(c) 2800
(d) 3000
Ans: B
Sol: The correct answer is 2600
This problem deals with integer partitions and combinations. A standard trick for these kinds of problems is to shift everything to the left side to make all the variables unconstrained.
Firstly, let's subtract the constraints from each variable:
So the answer is: 2600
Q39: Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: Dendral is an expert system
Reason R: The rationality of an agent is not related to its reaction to the environment.
In the light of the above statements, choose the correct answer from the options given below.
(a) Both A and R are true and R is the correct explanation of A
(b) Both A and R are true but R is NOT the correct explanation of A
(c) A is true but R is false
(d) A is false but R is true
Ans: C
Sol: The correct answer is A is true but R is false
Dendral is an expert system. It was a groundbreaking AI project developed in the 1960s and 1970s aimed at automatically deducing the structure of organic molecules based on their mass spectrometry data. So, assertion A is correct.
The second statement, however, is incorrect. The rationality of an agent in AI is very much related to its reaction to its environment. Rational agents should be able to make decisions based on their perceptions of the environment in order to achieve the best possible outcome or, in the case of uncertainty, the best expected outcome. Therefore, reason R is false.
Q40: Match List I with List II
Choose the correct answer from the options given below:
(a) A - III, B - II, C - I, D - IV
(b) A - II, B - III, C - IV, D - I
(c) A - IV, B - III, C - I, D - II
(d) A - IV, B - I, C - III, D - II
Ans: A
Sol: The correct answer is A - III, B - II, C - I, D - IV
A Δ B:
A - (B ∪ C):
A - (B ∩ C):
A ∩ (B - C):
Therefore, the correct option is A - III, B - II, C - I, D - IV. So, the correct option is 1).
Q41: Consider the following table of arrival time and burst time for three processes P0, P1, P2:
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of a process. What is the average waiting time for the three processes?
(a) 3 ms
(b) 3.67 ms
(c) 4.47 ms
(d) 4 ms
Ans: B
Sol: The correct answer is 3.67 ms
In Shortest Job First (SJF) scheduling, the process with the smallest burst time is processed next. In Preemptive SJF, if a new process arrives with CPU burst length less than remaining time of current executing process, CPU is preempted, and that new process starts execution.
Gantt chart
So, the average waiting time is:
(3ms + 0ms + 8ms) / 3 = 3.67ms (rounded to nearest hundredth)
So, the average waiting time for the processes under a preemptive SJF scheduling algorithm is approximately 3.67ms.
Q42: Which of the following scenario may lead to an irrecoverable error in a database system?
(a) A transaction writes a data item after it is read by an uncommitted transaction
(b) A transaction reads a data item after it is read by an uncommitted transaction
(c) A transaction reads a data item after it is written by a committed transactions
(d) A transaction reads a data item after it is written by an uncommitted transaction.
Ans: D
Sol: The correct answer is A transaction reads a data item after it is written by an uncommitted transaction.
An irrecoverable error is an error that does not permit the database to return to a consistent state after a failure. They are primarily caused by inconsistencies that occur during transactions. Looking at the provided scenarios:
A transaction writes a data item after it is read by an uncommitted transaction-
A transaction reads a data item after it is read by an uncommitted transaction -
A transaction reads a data item after it is written by a committed transaction -
A transaction reads a data item after it is written by an uncommitted transaction -
This results in a Dirty Read, which can lead to an irrecoverable error under specific circumstances:
So, scenario 4 can cause an irrecoverable error, but it's worth noting that the specific set of circumstances to cause such an error is relatively rare in well-designed systems that use transaction isolation levels to avoid these types of issues.
Q43: Let and H = {-1, 1} be groups under the multiplication. Then, the map ϕ : G → H defined by
is
(a) Not a homomorphism
(b) A one-one homomorphism, which is not onto
(c) An onto homomorphism, which is not one to one
(d) An homomorphism
Ans: C
Sol: The correct answer is An onto homomorphism, which is not one to one
This shows that the mapping ϕ is a homomorphism.
check whether it is one-one (injective) or onto (surjective).
So, applying these conclusions to the options, the answer is:
3) An onto homomorphism, which is not one to one.
Q44: Which of the following parser is most powerful parser?
(a) Operator precedence
(b) SLR
(c) Canonical LR
(d) LALR
Ans: C
Sol: The correct answer is Canonical LR
The Canonical LR parser is the most powerful among the ones you listed.
However, it's worth noting that although the Canonical LR parser is the most powerful, it also requires the most computational resources, which can make it less practical in some real-world scenarios. LALR parsers, for example, are widely used in various applications due to their balance of power and efficiency.
Q45: Which of the following statement is correct?
(a) Ackermann's function is primitive recursive.
(b) L= {anbkcn+k : n ≥ 0, k ≥ 0} is regular language.
(c) L = {anbj : n = J2} is not context free language
(d) For every context sensitive language L not including λ, there exists some linear bounded automata M such that L ≠ L(M).
Ans: C
Sol: The correct answer is L = {anbj : n = J2} is not context free language
Ackermann's function is not primitive recursive.
The language L= {anbkcn+k : n ≥ 0, k ≥ 0} is not regular.
L = {anbj : n = J2} is not context free language
For any context sensitive language L, excluding λ (the empty string), there exists a linear bounded automaton M that recognizes the language such that L ≠ L(M).
Q46: Match List I with List II
Choose the correct answer from the options given below:
(a) A - IV, B - III, C - I, D - II
(b) A - III, B - IV, C - II, D - I
(c) A - III, B - I, C - II, D - IV
(d) A - I, B - III, C - IV, D - I
Ans: B
Sol: The correct answer is A - III, B - IV, C - II, D - I
RAID level 2 ( III - Error correcting parity):
RAID level 4 (IV - Block interleaved parity):
RAID level 5 (II - Block interleaved distributed parity):
RAID level 3 (I - Bit interleaved parity):
By matching RAID levels with their corresponding strategies, we get option 2 as the correct one: A - III, B - II, C - II, D - I.
Q47: Consider the following statements.
A. The identity is unique in any monoid.
B. A monoid is a group if there exists inverse of each element of monoid.
C. Semi group has closure, associative and identity properties.
D. Quasi group has closure property.
Choose the correct answer from the options given below:
(a) A, B and D only
(b) B, C and D only
(c) A, B and C only
(d) A, C and D only
Ans: A
Sol: The correct answer is A, B and D only
A. The identity is unique in any monoid.
B. A monoid is a group if there exists inverse of each element of monoid.
C. Semi group has closure, associative and identity properties.
D. Quasi group has closure property.
Q48: Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: It is possible to create doubly linked list using only one pointer with every node.
Reason R: By storing the XOR of the addresses of the previous and next nodes.
In the light of the above statements, choose the most appropriate answer from the options given below.
(a) Both A and R are true and R is the correct of A
(b) Both A and R are true but R is NOT the correct of A
(c) A is true but R is false
(d) A is false but R is true
Ans: A
Sol: The correct answer is Both A and R are true and R is the correct of A
In a doubly linked list, each node typically maintains two references (or pointers): one to the next node and one to the previous node. However, it is indeed possible to create a doubly linked list using only one pointer per node. This can be achieved by storing the XOR of the addresses of the previous node and the next node in place of the two pointers. This technique is called XOR-linking.
Here's how it works:
Using this technique you can successfully traverse both forward and backward in the list using only one pointer in each node. So, both the
Assertion A and the Reason R are true and R is indeed a correct of A.
Q49: Consider the following statements:
A. Dynamic metrics are collected by measurements made of a program in execution
B. Static metrics are collected by measurements made of representations of the system
C. The assessment of software quality is an objective process
D. An important part of quality assurance in the selection of standards that should apply to the software development process.
Choose the correct answer from the options given below:
(a) A, B, C only
(b) B, C and D only
(c) A, C and D only
(d) A, B and D only
Ans: D
Sol: The correct answer is A, B and D only
Statement C is not correct. While some aspects of software quality assessment can be measured objectively, like code efficiency or bug count, other aspects are often subjective and may vary based on individual needs and context. For example, usability, readability of code, or fitness for a particular purpose can be quite subjective.
Other options:
Hence A, B and D only correct.
Q50: Consider a hash table of size seven with starting index zero and a hash function (6x + 3) mod 4. Assuming the hash table is initially empty. Which of the following is the content of the table when the sequence 1, 3, 8, 10, 5. is inserted into the table using closed hashing? Here "_______" denotes an empty location in the table.
(a) 1, 3, 8, 10, 5, _, _
(b) 3, 8, 1, _, 10, 5
(c) _,3, 8, 1, _, 10, 5
(d) _1, 3, 8, 10, 5, _
Ans: D
Sol: The correct answer is _1, 3, 8, 10, 5, _
To insert each element into the hash table using closed hashing, we can use the given hash function (6x + 3) mod 4. Let's go through each element in the sequence and insert them into the hash table:
So, the correct answer is: 4) _, 1, 3, 8, 10, 5, _
Q51: Consider the following finite automata F1 that accepts a language L
Let F2 be a finite automata which is obtained by reversal of F1. Then which of the following is correct?
(a) L(F1) ≠ L(F2)
(b) L(F1) = L(F2)
(c) L(F1) ≤ L(F2)
(d) L(F1) ≥ L(F2)
Ans: B
Sol: The correct answer is L(F1) = L(F2)
Finite automata, also known as finite state machines, are abstract machines utilized in computer science and mathematical computations. They serve as a simple model for computation, providing a mathematical abstraction to describe and understand various systems' behaviors.
A finite automaton can be formally defined as a 5-tuple (Q, Σ, δ, q0, F) where:
F1:
F2: Reversal of F1
Both are accept same string so L(F1) = L(F2)
Q52: The maximum yield length of the following CNF CFG is
S → AB
A → CD
B → e
C → a
D → b
(a) 8
(b) 7
(c) 4
(d) 5
Ans: C
Sol: The correct answer is 4
CFG stands for Context-Free Grammar. It is a formalism used in formal language theory and computer science to describe the syntax or structure of languages. In this CFG, S, A, B, C, D are non-terminal symbols, and a, b, and e are terminal symbols. These rules show that every non-terminal symbol eventually maps to a single terminal symbol.
The production of S gives us AB, which can further be expanded as follows: A gives CD and B gives e.
So AB becomes CDe.
Further expanding C and D (which give a and b respectively), we obtain: CDe becomes ab and then e, leading to the string abe.
So, apparently, the yielded string has length three. However, note that the grammar rule B → e is part of Chomsky Normal Form (CNF) grammar, and although it appears to produce a single terminal symbol, it is considered to produce two symbols in terms of its yield length. This is because in CNF, each production either produces two non-terminals or one terminal.
With that understanding, we would have: S (yield length = 4) → A (yield length = 2) + B (yield length = 2)
This sums up to a total yield length of 4, which corresponds to option 3) 4.
Therefore, the maximum yield length of this CFG is 4, and the correct answer is 3) 4.
Q53: ___________ is intended to show that a system both conforms to its specifications and meets the expectations of the system customer.
(a) Software specification
(b) Software design
(c) Software evaluation
(d) software validation
Ans: D
Sol: The correct answer is software validation
Software Validation:
Other Related Points
Software Specification:
Software Design:
Software Evaluation:
Q54: Which is not the component of the natural language understanding process?
(a) Morphological analysis
(b) Semantic analysis
(c) Pragmatic analysis
(d) Meaning analysis
Ans: D
Sol: The correct answer is Meaning analysis
Meaning analysis is not a conventional component in the process of Natural Language Understanding (NLU). The usual components include:
"Meaning Analysis" is not a conventionally distinguished step in the NLU process. It seems too broad and vague and potentially encompasses semantic analysis and/or pragmatic analysis.
Other Related PointsNatural Language Understanding (NLU) is a subfield of Artificial Intelligence that focuses on machine reading comprehension. The goal of NLU is to create systems that understand input presented in natural language, including slang, jargon, or colloquial speech. The process typically involves several steps:
Q55: Suppose a circular queue of capacity (n - 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variable respectively. Initially, REAR = FRONT = 0. The conditions to detect queue empty and queue full are
(a) EMPTY : REAR == FRONT
FULL : (REAR + 1) mod n == FRONT
(b) EMPTY : (FRONT + 1) mod n == REAR
FULL : (REAR + 1) mod n == FRONT
(c) EMPTY (REAR + 1) mod n == FRONT
FULL : REAR == FRONT
(d) EMPTY : REAR == FRONT
FULL : (FRONT + 1) mod n == REAR
Ans: A
Sol: The Correct answer is EMPTY : REAR == FRONT and FULL : (REAR + 1) mod n == FRONT
A circular queue is a queue whose last position is connected back to the first position.
After inserting an element in the last position, the next element again gets inserted into the first position.
To check full condition in queue:
To check empty condition in queue:
Hence, the correct answer is “option 1”.
Q56: Given below are two statements:
Let f(n) and g(n) be asymptotically positive functions. The following conjectures are given
Statement I: f(n) ≥ 1 and f(n) = O(g(n)) ⇒ g(n) = Ω(f(n))
Statement II: f(n) = O(g(n)) ⇒ Ig(f(n)) = O(1g(g(n))) where Ig(g(n)) ≥1 for all sufficient large n.
In the light of the above statements, choose the most appropriate answer from the options given below.
(a) Both Statement I and Statement II are correct
(b) Both Statement I and Statement II are incorrect
(c) Statement I is correct but Statement II is incorrect
(d) Statement I is incorrect but Statement II is correct
Ans: A
Sol: The correct answer is Both Statement I and Statement II are correct
In the asymptotic analysis, we refer to Big O notation (O) and Big Omega notation (Ω) to describe upper and lower bounds of functions respectively.
Other Related Points
Q57: Consider following statements:
A. A context free language is generated by LR(o) grammar if and only if it is accepted by a deterministic pushdown automata and has prefix property
B. If M1 is the single tape TM simulating multilape TM M, then time taken by M1 to simulate n moves is (n3)
C. Push down automata behaves like a Turning machine when it has one auxiliary memory.
D. L= {anbncn : n ≥ 1} is not context free but context sensitive.
Choose the correct answer from the options given below:
(a) A, B and C only
(b) A, B only
(c) D only
(d) B, C only
Ans: C
Sol: The correct answer is D only
A. A context free language is generated by LR(0) grammar if and only if it is accepted by a deterministic pushdown automata and has prefix property:
B. If M1 is the single tape TM simulating multilape TM M, then time taken by M1 to simulate n moves is (n3):
C. Push down automata behaves like a Turing machine when it has one auxiliary memory:
D. L= L= {anbncn : n ≥ 1} is not context free but context sensitive:
So, only Statement D is correct.
Q58: Match List I with List II
Choose the correct answer from the options given below:
(a) A - IV, B - I, C - III, D - II
(b) A - II, B - III, C - IV, D - I
(c) A - IV, B - III, C - I, D - II
(d) A - II, B - IV, C - I, D - III
Ans: C
Sol: The correct answer is A - IV, B - III, C - I, D - II
A. Bezier curves and IV (painting drawing CAD):
B. B-Splines and III (Bias and tension):
C. Sweep representations and I (3 dim objects that have translation rotational symmetry):
D. Natural objects and II (Fractal geometry):
Q59: There are M points on one straight line AB and n points on another straight line AC none of them being A. How many triangles can be formed with these points as vertices?
(a) mn(m + n - 2)
(b) mn(m + n - 2)
(c) mn(m + n - 1)
(d) mn(m + n - 1)
Ans: B
Sol: The correct answer ismn(m + n - 2)
:
Let's consider a triangle with vertices B, C, and a point D on line AB. This way, we have two vertices from line AB (B and D) and one from line AC (C).
So, the vertices of the triangle would be B, C, and D.
This creates a triangle without using vertex A. If you have any specific requirements or constraints
= mC2 x nC1 + nC2 x mC1
Q60: Which of the following is not a mutation operator in a genetic algorithm?
A. Random resetting
B. Scramble
C. Inversion
D. Difference
Choose the correct answer from the options given below:
(a) A and B only
(b) B and D only
(c) C and D only
(d) D only
Ans: D
Sol: The correct answer is D only
Mutation operators in a Genetic Algorithm are used for perturbing the genes in a solution. They help in keeping the diversity of the population and avoiding premature convergence on local optima. Here's a brief of the operators mentioned:
Therefore, the answer is 4) D only.
Q61: A. The set of Turing machine codes for TM's that accept all inputs that are palindromes (possible along with some other inputs) is decidable
B. The language of codes for TM's M that when started with blank tape, eventually write a 1 somewhere on the tape is undecidable
C. The language accepted by a TM M is L (M) is always recursive
D. Post's correspondence problem is undecidable
Choose the correct answer from the options given below:
(a) A, B and C only
(b) B, C and D only
(c) A and C only
(d) B and D only
Ans: D
Sol: The correct answer is B and D only
A. The set of Turing machine codes for TMs that accept all inputs that are palindromes is decidable:
B. The language of codes for TM's M that when started with blank tape, eventually write a 1 somewhere on the tape is undecidable:
C. The language accepted by a TM M is L(M) is always recursive:
D. Post's correspondence problem is undecidable:
So, the Option 4) B and D only remains the correct answer.
Q62: Consider universe positive integer X= {1 ≤ n ≤ 8}, proposition P= "n is an even integer", Q = "(3 ≤ n ≤ 7) ^ (n ≠ 6)". Then truth set of P ↔ Q is
(a) {1, 4}
(b) {2, 6}
(c) {3, 4, 5}
(d) {1}
Ans: A
Sol: The correct answer is {1, 4}
SOLUTION:
X= {1 ≤ n ≤ 8} So, X = {1, 2, 3, 4, 5, 6, 7, 8}
P= "n is an even integer" So, P = {2, 4, 6, 8}
Q = "(3 ≤ n ≤ 7) ^ (n ≠ 6)" So, Q = {3, 4, 5, 7}
P ↔ Q = (¬P v Q) ^ (P v ¬Q)
P ↔ Q = ({1, 3, 5, 7} v {{3, 4, 5, 7}) ^ ({2, 4, 6, 8} v {1, 2, 6, 8})
P ↔ Q = {1,3, 4, 5, 7} ^ {1, 2, 4, 6, 8}
P ↔ Q = {1, 4}
So, Correct answer is Option 1 {1, 4}
Q63: An observational technique that can be used to understand operational process and help to derive requirement for software to support operational process is known as
(a) Requirement specification
(b) Structural specification
(c) Ethnography
(d) Natural language specification
Ans: C
Sol: The correct answer is Ethnography
In conclusion, through ethnography, requirements for software can be derived organically from the environment in which it will be used, rather than being imposed based on assumptions or out-of-context criteria.
Other Related Points
Q64: Southerland Hodgman method is used on
(a) Smooth curves
(b) Line segment
(c) Convex polygons
(d) Concave polygons
Ans: C
Sol: The correct answer is Convex polygons
Smooth curves:
Line segment:
Convex polygons:
Concave polygons:
So, the Sutherland-Hodgman algorithm is mainly used for convex polygon clipping and is not intended for dealing with smooth curves or concave polygons. If you need to clip line segments or work with concave polygons, other algorithms may be more suitable for those specific tasks.
Q65: Let N denote the set of all natural numbers and R be the relation on NXN defined by (a, b) R(c, d), if ad(b + c) = bc(a + d). Then R is
(a) Symmetric only
(b) Reflexive only
(c) Transitive only
(d) An equivalence relation
Ans: D
Sol: The correct answer is An equivalence relation
We are given a relation R defined on pairs of natural numbers, where (a, b) R (c, d) if ad(b + c) = bc(a + d).
We can check whether R is symmetric, reflexive, transitive, or an equivalence relation by verifying the condition for each .
Symmetry:
Reflexivity:
Transitivity:
Above question follow all condition so it is an equivalence relation.
Q66: let R (A, B, C, D) be a relational schema with following function dependencies:
A → B, B → C
C → D and D → B
The decomposition of R into
(A, B) (B, C) (B, D)
(a) gives a lossless join, and is dependency preserving
(b) gives lossless join, but is not dependency preserving
(c) does not give a lossless join, but is dependency preserving
(d) does not give a lossless join and is not dependency preserving
Ans: A
Sol: The correct answer is gives a lossless join, and is dependency preserving
For the given relational schema R(A,B,C,D) with functional dependencies: A → B, B → C, C → D, D → B, it's decomposed into (A, B), (B, C), (B, D).
A decomposition is a lossless join if for every functional dependency X -> Y, at least one of these conditions holds:
And it is dependency-preserving if for every dependency X -> Y in F, we have:
Analyzing the decomposed relations:
We have:
So the answer is option 1.
Q67: Given below are two statements:
Which of the following statement/s is/are correct with respect to virtual memory
Statement I: Address translation is performed for every logical address used during the execution of a program
Statement II: A program can execute only when all of its components are loaded in the memory
In the light of the above statements, choose the most appropriate answer from the options given below.
(a) Both Statement I and Statement II are correct
(b) Both Statement I and Statement II are incorrect
(c) Statement I is correct but Statement II is incorrect
(d) Statement I is incorrect but Statement II is correct
Ans: C
Sol: The correct answer is Statement I is correct but Statement II is incorrect
Statement I is correct - Address translation is performed for every logical address used during the execution of a program
Statement II is incorrect - A program can execute only when all of its components are loaded in the memory
Q68: In the standard Ethernet with transmission rate of 10 Mbps, assume that the length of the medium is 2500 m and size of a frame is 512 bytes. The propagation speed of a signal in a cable is normally 2 × 108 m/s. The transmission delay and propagation delay are
(a) 25.25 μs and 51.2 μs
(b) 51.2 μs and 12.5 μs
(c) 10.24 μs and 50.12 μs
(d) 12.5 μs and 51.2 μs
Ans: B
Sol: The correct answer is 51.2μs and 12.5μs
Consequently, in a standard Ethernet setup featuring a transmission rate of 10 Mbps, a medium length of 2500 m, and a frame size of 512 bytes, the correspondingly calculated transmission delay and propagation delay are 51.2μs and 12.5μs, respectively.
Q69: Match List I with List II
Choose the correct answer from the options given below:
(a) A - IV, B - I, C - III, D - II
(b) A - II, B - I, C - III, D - IV
(c) A - I, B - II, C - III, D - IV
(d) A - IV, B - III, C - I, D - II
Ans: B
Sol: The correct answer is A - II, B - I, C - III, D - IV
A. Critical region - II. Mutual exclusion:
B. Wait signal - I. Hoare's monitor:
C. Working set - III. Principle of locality:
D. Deadlock - IV. Circular wait:
Q70: Match List I with List II
Choose the correct answer from the options given below:
(a) A - III, B - II, C - I, D - IV
(b) A - II, B - III, C - I, D - IV
(c) A - III, B - I, C - II, D - IV
(d) A - II, B - IV, C - I, D - III
Ans: C
Sol: The correct answer is A - III, B - I, C - II, D - IV
A. Physical layer -
B. Data Link Layer -
C. Network layer -
D. Transport layer -
Q71: Consider the rectangle with vertices (0, 0), (0, 2), (3, 0), (3, 2). There is scaling of 2 towards x-axis and 3 towards y-axis. The new cordinates of the rectangle are
(a) (0, 0), (6, 0), (0, 4), (6, 4)
(b) (0, 0), (6, 0), (0, 4), (3, 2)
(c) (0, 0), (6, 0), (0, 6), (6, 6)
(d) (0, 0), (4, 0), (0, 6), (4, 6)
Ans: C
Sol: The correct answer is (0, 0), (6, 0), (0, 6), (6, 6)
The scaling operation does not change the origin (0,0).
When you apply the scale of 2 towards the x-axis to a point (x,y), you get (2*x, y) because you're scaling only on the x-axis.
Similarly, when you apply the scale of 3 towards the y-axis to a point (x,y), you get (x, 3*y) because you're scaling only on the y-axis.
So:
The new coordinates of the rectangle are (0, 0), (0, 6), (6, 0), (6, 6)
Q72: Match List I with List II
Choose the correct answer from the options given below:
(a) A - III, B - IV, C - II, D - I
(b) A - IV, B - I, C - II, D - III
(c) A - I, B - III, C - II, D - II
(d) A - I, B - III, C - II, D - IV
Ans: D
Sol: The correct answer is A - I, B - III, C - II, D - IV
A. PERT (Project Evaluation and Review Technique)
B. Optimistic Time
C. CPM (Critical Path Method)
D. Pessimistic Time
Q73: What is the output of following code?
main ( )
{static float a [ ] = {13.24, 1.5, 4.5, 5.4, 3.5}
float *j, *k;
j = a;
k = a + 4
j = j * 2;
k = k/2;
printf("% f% f', *j, *k):
}
(a) 13.25, 4.5
(b) 1.5, 3.5
(c) 13.24, 1.5, 4.5, 5.4, 3.5
(d) Illegal use of pointer in main function
Ans: D
Sol: The correct answer is Illegal use of pointer in main function
The code as written would result in an error due to the illegal use of pointers, so the correct answer would be: Illegal use of pointer in main function
Here are the problems with the code:
The Correct Program is:
main ( )
{
static float a [ ] = {13.24, 1.5, 4.5, 5.4, 3.5};
float *j, *k;
j = a;
k = &a[4];
*j = *j * 2;
*k = *k / 2;
printf("%f, %f", *j, *k);
}
Q74: A. If some NP-complete problem P is in ℙ that P = NP
B. TSP is in ℕℙ
C. SAT is in ℕℙ
D. Hamilton circuit problem is not NP-complete
Choose the correct answer from the options given below:
(a) A, B and C only
(b) B, C and D only
(c) C, D and A only
(d) D, A and B only
Ans: A
Sol: The correct answer is A, B and C only
Statement A: "If some NP-complete problem P is in P then P = NP" is correct.
Statement B: "TSP is in NP" is correct.
Statement C: "SAT is in NP" is correct as well.
Statement D: "Hamilton circuit problem is not NP-complete" is incorrect.
Q75: Which one of the following is NOT a part of ACID properties of a database transaction?
(a) Atomicity
(b) Consistency
(c) Isolation
(d) Deadlock-freedom
Ans: D
Sol: The correct answer is Deadlock-freedom
ACID properties of a database transaction
On the other hand, "deadlock-freedom" is not a part of ACID. Deadlocks are a condition where two or more transactions are unable to proceed because each holds a lock that the other needs. Deadlock prevention and detection are indeed crucial aspects of database management systems but are not included in the ACID properties.
Q76: Consider the following statements
A. Fuzzy C-means clustering is a supervised method of learning
B. PCA is used for dimension reduction
C. Apriori is not a supervised technique
D. When a machine learning model becomes so specially tuned to its exact input data that it fails to generalize to other similar data it is called underfitting
Choose the correct answer from the options given below:
(a) A and B
(b) B and C
(c) C and D
(d) D and A
Ans: B
Sol: The correct answer is B and C
A. C-Fuzzy means clustering is a supervised method of learning.
This statement is incorrect. Fuzzy C-means clustering is an unsupervised method, not a supervised one.
B. PCA is used for dimension reduction.
This statement is correct. Principal Component Analysis (PCA) is commonly used for dimensionality reduction in machine learning.
C. Apriori is not a supervised technique.
This statement is correct. Apriori is an algorithm used for association rule mining in unsupervised learning.
D. When a machine learning model becomes so specially tuned to its exact input data that it fails to generalize to other similar data, it is called underfitting.
This statement is incorrect. The described scenario is an example of overfitting, not underfitting. Underfitting occurs when a model is too simple to capture the underlying patterns in the data.
The correct statements are B and C.
Q77: Which phase of compiler checks the grammar of programming?
(a) Code optimization
(b) Semantic analysis
(c) Code generators
(d) Syntax analysis
Ans: D
Sol: The correct answer is Syntax analysis
Semantic Analysis:
Other Related Points
Lexical Analysis:
Code Optimization:
Code Generation:
Syntax Analysis or Parsing:
Q78: Consider the following language:
L= {w ∈ { a, b, c }* : na(ω) + nb(ω) = nc(ω)}
L is
(a) Context free but not linear
(b) Not context free
(c) Context free and linear
(d) Linear
Ans: A
Sol: The correct answer is Context free but not linear
The given language L={w ∈ { a, b, c }* : na(ω) + nb(ω) = nc(ω)} consists of strings over the alphabet {a, b, c} with the property that the total number of a's and b's in any string must be equal to the total number of c's.
This language is context-free.
On the other hand, a linear language is a proper subset of context-free languages where the grammar generating the language never has more than one non-terminal in the right-hand side of any of its productions (can also be processed with a deterministic pushdown automaton).
Q79: The compiler for high level language that runs on one machine and produces code for other machine is called-
(a) Cross compiler
(b) Multipass compiler
(c) Optimizing Compiler
(d) One pass Compiler
Ans: A
Sol: The correct answer is Cross compiler
Cross compiler
That's why the statement "The compiler for a high-level language that runs on one machine and produces code for another machine" refers to a cross compiler.
The other options given like Multipass compiler, Optimizing Compiler, and One pass Compiler refer to different aspects of compilers:
Q80: What is the (4 + 4) fit binary fixed point equivalent of -(3.72)10?
(a) 0011.1100
(b) 0011.1010
(c) 1100.0100
(d) 0011.1011
Ans: C
Sol: The correct answer is 1100.0100
Fixed point representation is a way of storing real numbers in binary form. A 4 + 4 binary fixed point accommodates 4 bits for the integer part (one of them being the sign bit) and 4 bits for the fractional part.
Here is how we work out the binary equivalent of -3.72:
Integer part (-3):
Fraction part (0.72): For the fractional part, we keep multiplying by 2:
So the binary fixed point equivalent of -3.72 is -3 for the integer part, and 0.72 for the fractional part, combine them and we get answer: 1100.0100
Q81: Let ⊕ denote XOR operation. Let 1 and 0 denote the binary constants and F is the Boolean expression over two variables P and Q
F(P, Q) = ((1 ⊕ P) ⊕ (P ⊕ Q)) + ((P ⊕ Q) ⊕ (Q ⊕ 0))
Which of the following is equivalent expression to F?
(a) Ρ ⊕ Q
(b) P + Q
(c)
(d)
Ans: D
Sol: The correct answer is
XOR operator ⊕ is both commutative and associative.
CALCULATION:
Q82: Let (Z, +) denote the group of all integers under addition. Then the number of all automorphisms of (Z, +) is
(a) 1
(b) 2
(c) 3
(d) 4
Ans: B
Sol: The correct answer is 2
In the group of all integers under addition, there are only two automorphisms. One is the identity map (each number maps to itself) and the other is the negation map (each number maps to its negative). This is because an automorphism in this group must preserve the group operation, which is addition, and these two functions are the only ones that do this.
Both of these homomorphisms are in fact automorphisms since they are bijective (one-to-one and onto).
So, the correct answer is 2) 2.
Q83: Match List I with List II
Choose the correct answer from the options given below:
(a) A - III, B - IV, C - II, D - I
(b) A - III, B - IV, C - I, D - II
(c) A - II, B - III, C - IV, D - I
(d) A - II, B - I, C - IV, D - III
Ans: B
Sol: The correct answer is A - III, B - IV, C - I, D - II
A. CDMA:
B. GSM:
C. UMTS:
D. WiFi:
Q84: IP datagram has arrived with following partial information in the header (in hexadecimal)
45000054000300002006.....
What is the efficiency of this datagram?
(a) 76.19%
(b) 80.50%
(c) 82.24%
(d) 85.45%
Ans: A
Sol: The correct answer is 76.19%
The header of the IP datagram given is in hexadecimal format.
Size of the header is 20 to 60 Bytes
Version = 4 bits = (0100)2 (It is IPv4)
Header length = (0101)2 to (1111)2 = 5 bits to 15 bits
Total length = 216 bits
Identification = 216 bits
Fragment Offset = 216 bits
Time to live = 28 bits
Protocol = 28 bits
Header Checksum = 216 bits
SOLUTION:
IP Datagram = 45000054 00030000 2006.......
4 5 00 0054
The efficiency of an IP datagram can be determined by calculating the ratio of the payload (data) size to the total datagram size.
As we have determined above:
Subtracting the header size from the total size gives us the payload size:
The efficiency of the datagram is then:
So,
Therefore, the efficiency of this datagram is approximately 76.19%.
Q85: IP datagram has arrived with following partial information in the header (in hexadecimal)
45000054000300002006.....
What is the protocol of the payload being carried by the packet?
(a) ICMP
(b) SCTP
(c) TCP protocol
(d) IGMP
Ans: C
Sol: The correct answer is TCP protocol
:
The header of the IP datagram given is in hexadecimal format.
Size of the header is 20 to 60 Bytes
Version = 4 bits = (0100)2 (It is IPv4)
Header length = (0101)2 to (1111)2 = 5 bits to 15 bits
Total length = 216 bits
Identification = 216 bits
Fragment Offset = 216 bits
Time to live = 28 bits
Protocol = 28 bits
Header Checksum = 216 bits
SOLUTION:
IP Datagram = 45000054 00030000 2006.......
20 06
The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.
The 9th byte (which is the 7th and 8th characters in the hexadecimal representation) identifies the protocol of the contained data.
In the given header, the protocol value is "06".
This value corresponds to the TCP protocol according to the Assigned Internet Protocol Numbers. Therefore,
The payload being carried by the packet is using the TCP protocol. So, the correct answer is: TCP protocol
Q86: IP datagram has arrived with following partial information in the header (in hexadecimal)
45000054000300002006.....
What is the size of datagram?
(a) 64 bytes
(b) 74 bytes
(c) 84 bytes
(d) 104 bytes
Ans: C
Sol: The correct answer is 84 bytes
The header of the IP datagram given is in hexadecimal format.
Size of the header is 20 to 60 Bytes
Version = 4 bits = (0100)2 (It is IPv4)
Header length = (0101)2 to (1111)2 = 5 bits to 15 bits
Total length = 216 bits
Identification = 216 bits
Fragment Offset = 216 bits
Time to live = 28 bits
Protocol = 28 bits
Header Checksum = 216 bits
SOLUTION:
IP Datagram = 45000054 00030000 2006.......
4 5 00 0054
The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.
The total length field is the second and third bytes of the IP header, "000054" in this case. These two bytes specify the total length of the whole IP datagram including the header and the data.
"000054" in hexadecimal is 84 in decimal. This value represents the total length of the datagram in bytes.
Therefore, the size of the datagram is 84 bytes.
Q87: IP datagram has arrived with following partial information in the header (in hexadecimal)
45000054000300002006.....
How many more routers can the packet travel to?
(a) 22
(b) 26
(c) 30
(d) 32
Ans: D
Sol: The correct answer is 32
The header of the IP datagram given is in hexadecimal format.
Size of the header is 20 to 60 Bytes
Version = 4 bits = (0100)2 (It is IPv4)
Header length = (0101)2 to (1111)2 = 5 bits to 15 bits
Total length = 216 bits
Identification = 216 bits
Fragment Offset = 216 bits
Time to live = 28 bits
Protocol = 28 bits
Header Checksum = 216 bits
SOLUTION:
IP Datagram = 45000054 00030000 2006.......
20 06
The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.
The hop limit (also known as the time-to-live limit in IPv4) is represented by the 8th byte, which in this case is "20" in hexadecimal. This value decrements by one each time the packet passes through a router. When it reaches zero, the packet is discarded.
"20" in hexadecimal translates to 32 in decimal. Therefore, the packet can travel through 32 more routers before it gets discarded.
Q88: A B-tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then maximum number of nodes that could be newly created in the process is
(a) 5
(b) 4
(c) 3
(d) 2
Ans: A
Sol: The correct answer is 5
Formula:
Other Related Points
If the database table has h levels and the level of the root node is 1 then on a new key insertion, the maximum number of nodes newly created is h + 1
Inserting a key into a full B-tree with 4 levels causes splits at each level (4 new nodes) and a new root (1 node), totaling 5 nodes.
Q89: Given below are two statements:
Statement I: If f and g are two functions and f = O(g) but g ≠ o(f), we say that the growth rate of g is smaller than that of f
Statement II: The class of all decision problems decided by a TM in exponential time, that is O(2k), k being a constant.
In the light of the above statements, choose the most appropriate answer from the options given below.
(a) Both Statement I and Statement II are correct
(b) Both Statement I and Statement II are incorrect
(c) Statement I is correct but Statement II is incorrect
(d) Statement I is incorrect but Statement II is correct
Ans: B
Sol: The correct answer is Both Statement I and Statement II are incorrect
Statement I: This is incorrect.
Statement II is incorrect.
Q90: Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: A process involves a library function to create a thread.
Reason R: The threads make system calls to convey their resource and I/O requirement to the Kernel.
In the light of the above statements, choose the correct answer from the options given below.
(a) Both A and R are true and R is the correct of A
(b) Both A and R are true but R is NOT the correct of A
(c) A is true but R is false
(d) A is false but R is true
Ans: B
Sol: The correct answer is Both A and R are true but R is NOT the correct of A
However, Reason R is not the correct of Assertion A. The reason for using a library function to create a thread doesn't directly relate to threads making system calls. In other words, threads making system calls to the kernel is a thread behavior and not a direct justification or for why a process would use a library function to create a thread.
Q91: IP datagram has arrived with following partial information in the header (in hexadecimal)
45000054000300002006.....
What is the header size ?
(a) 10 bytes
(b) 20 bytes
(c) 30 bytes
(d) 40 bytes
Ans: B
Sol: The correct answer is 20 bytes
The header of the IP datagram given is in hexadecimal format.
Size of the header is 20 to 60 Bytes
Version = 4 bits = (0100)2 (It is IPv4)
Header length = (0101)2 to (1111)2 = 5 bits to 15 bits
Total length = 216 bits
Identification = 216 bits
Fragment Offset = 216 bits
Time to live = 28 bits
Protocol = 28 bits
Header Checksum = 216 bits
SOLUTION:
IP Datagram = 45000054 00030000 2006.......
4 5 00 0054
The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.
The first digit '4' is the IP version i.e., IPv4. The second digit '5' represents the Internet Header Length (IHL).
The IHL field is 4 bits long and specifies the header length in 32-bit words. '5' in hexadecimal is 5 in decimal, which means the header length is 5 words (32-bit or 4 bytes each).
So, the size of the header is 5 * 4 = 20 bytes.
Q92: Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen (i is row index and j is column index):
for j = [0..... 1023]{
temp = 0;
for i = [0.... 16]:
temp = temp + T[i] [j];
print (temp/17.0); }
T [i] [j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used ", If T is stored in the virtual address space in row major format.
What is the main memory hit ratio?
(a) 0
(b) 1
(c) 2
(d) 3
Ans: A
Sol: The correct answer is 0
To determine the number of page faults, let's analyze the memory accesses in the given program. Since the table T is stored in row-major format, the program accesses elements in a contiguous manner within rows. Each row has 1024 elements, and there are 17 rows.
The memory page size is 1024 words, and there are 16 pages. Each page can hold one row of the table.
Now, let's consider the nested loops:
for j in range(1024):
temp = 0
for i in range(17):
temp = temp + T[i][j]
print(temp/17.0)
The inner loop iterates over rows, so it sequentially accesses elements in a column (same column index j) for each iteration of the outer loop. This means that for each column, the inner loop will access 17 consecutive elements, which are located in 17 different rows.
Since each page can hold a full row (17 elements), accessing a column will result in a page fault for each iteration of the outer loop (for each column).
Therefore, the total number of page faults will be the number of columns multiplied by the number of page faults per column:
According to above solution no any page hit in the main memory
(17,408 - 17,408) / 17,408 = 0
So, the correct answer is: 1) 0
Q93: Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen (i is row index and j is column index):
for j = [0..... 1023]{
temp = 0;
for i = [0.... 16]:
temp = temp + T[i] [j];
print (temp/17.0); }
T [i] [j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used ", If T is stored in the virtual address space in row major format.
Consider again that T is stored in column-major format, what is the main memory hit ratio?
(a) 80%
(b) 95.6%
(c) 97.8%
(d) 99.9%
Ans: D
Sol: The correct answer is 99.9%
In column-major format, each column contains 17 elements. The memory page size is 1024 words, and there are 16 pages. Each page can hold a complete column (60 elements) along with some remainder (4 elements).
Now, let's calculate the main memory hit ratio.
So, the correct answer is indeed: 4) 99.9%
Q94: Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen (i is row index and j is column index):
for j = [0..... 1023]{
temp = 0;
for i = [0.... 16]:
temp = temp + T[i] [j];
print (temp/17.0); }
T [i] [j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is pages and holds 16 pages of size 1024 words, the page replacement policy is "least recently used ", If T is stored in the virtual address space in row major format.
Consider that T is stored in column major format, how many page faults will be encountered?
(a) 14
(b) 15
(c) 16
(d) 17
Ans: D
Sol: The correct answer is 17
In column-major format, each column contains 17 elements. Given that the memory page size is 1024 words, we can calculate how many complete columns can fit into one page. .
This means that each page can store 60 complete columns, along with 4 additional elements (the remainder). Therefore, for every 60 columns accessed, there will be a page fault for the next column, as it crosses the boundary of the page.
Now, we can determine the total number of page faults for the entire set of columns:
As in Q93, each column = 68 bytes, page = 4096 bytes,
so 60 columns per page.
Total columns = 1024, requiring 18 pages.
With 16 pages, faults occur for the first 16 columns (16 faults), plus one more fault when accessing the 17th page (columns 961–1024).
Total faults = 16 + 1 = 17.
The answer (d) is correct
So, the correct number of page faults, as per the provided , is 17.
Q95: Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen (i is row index and j is column index):
for j = [0..... 1023]{
temp = 0;
for i = [0.... 16]:
temp = temp + T[i] [j];
print (temp/17.0); }
T [i] [j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used ", If T is stored in the virtual address space in row major format.
How many page faults will be encountered?
(a) 16,402
(b) 17,408
(c) 18,208
(d) 18,608
Ans: B
Sol: The correct answer is 17,408
To determine the number of page faults, let's analyze the memory accesses in the given program. Since the table T is stored in row-major format, the program accesses elements in a contiguous manner within rows. Each row has 1024 elements, and there are 17 rows.
The memory page size is 1024 words, and there are 16 pages. Each page can hold one row of the table.
Now, let's consider the nested loops:
for j in range(1024):
temp = 0
for i in range(17):
temp = temp + T[i][j]
print(temp/17.0)
The inner loop iterates over rows, so it sequentially accesses elements in a column (same column index j) for each iteration of the outer loop. This means that for each column, the inner loop will access 17 consecutive elements, which are located in 17 different rows.
Since each page can hold a full row (17 elements), accessing a column will result in a page fault for each iteration of the outer loop (for each column).
Therefore, the total number of page faults will be the number of columns multiplied by the number of page faults per column:
So, the correct answer is: 2) 17,408
Q96: Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen (i is row index and j is column index):
for j = [0..... 1023]{
temp = 0;
for i = [0.... 16]:
temp = temp + T[i] [j];
print (temp/17.0); }
T [i] [j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used ", If T is stored in the virtual address space in row major format.
What is fault ratio of row major to column major arrangements?
(a) 1024 ∶ 1
(b) 1301 ∶ 1
(c) 1240 ∶ 1
(d) 9107 ∶ 8
Ans: A
Sol: The correct answer is 1024 ∶ 1
The fault ratio of row-major to column-major arrangements can be determined by comparing the number of page faults for each arrangement. In the row-major arrangement, as previously calculated, there are 17,408 page faults. In the column-major arrangement, there are also 17 page faults.
Now, let's find the fault ratio:
So, the correct answer is: 1) 1024 ∶ 1
Q97: Consider two hosts P and Q that are connected through a router R. The maximum transfer unit (MTU) value of the link between P and R is 1500 bytes and between R and Q is 820 bytes. A TCP segment of size 1400 bytes is transferred from P to Q through R with IP identification value of 0x1234. Assume that IP header size is 20 bytes. Further the packet is allowed to be fragmented that is Don't fragment (DF) flag in the IP Header is not set by P. Which of the following statement/s is/are true?
A. Two fragments are created at R and IP datagram size carrying the second fragment is 620 bytes
B. If the second fragment is lost, then R resends the fragment with IP identification value of 0x1234
C. If the second fragment lost, then P requires to resend the entire TCP segment.
D. TCP destination port can be determined by analyzing the second fragment only.
Choose the correct answer from the options given below:
(a) A, B and C only
(b) A and C only
(c) C and D only
(d) B and D only
Ans: B
Sol: The correct answer is A and C only
A) Two fragments are created at R and IP datagram size carrying the second fragment is 620 bytes:
B) If the second fragment is lost, then R resends the fragment with IP identification value of 0x1234:
C) If the second fragment lost, then P requires to resend the entire TCP segment:
D) TCP destination port can be determined by analyzing the second fragment only:
The answer is (2), A and C only.
Q98: Which of the following is not a property of a good system for representation of knowledge in a particular domain?
(a) Presentation adequacy
(b) infrential adequacy
(c) Infential efficiency
(d) acquisitional efficiency
Ans: A
Sol: The correct answer is Presentation adequacy
Presentation Adequacy:
Inferential Adequacy:
Inferential Efficiency:
Acquisitional Efficiency:
So, in the context of knowledge representation systems, presentation adequacy might not be considered a primary property because the primary focus is often on the system's ability to represent, reason, and acquire knowledge efficiently. The effectiveness of presenting information to users is crucial but might be considered as a secondary aspect in comparison to the system's overall efficiency in handling knowledge.
Q99: What is x in the following program?
#include <stdio.h>
int main ( )
{typedef (* (*arrfptr [3]) ( ) ) [10];
arrfptr x;
return 0 ;
}
(a) x is a pointer
(b) x is a array of three pointer
(c) x is an array of three function pointer
(d) Error in x declaration
Ans: C
Sol: The correct answer is x is an array of three function pointer
The given program declares an array of three function pointers named x. Each function pointer is of type (* (*arrfptr [3]) ( ) ) [10].
typedef (* (*arrfptr[3])()) [10];
This declares arrfptr as an array of three pointers to functions with no parameters (specified by ()), and each function returns a pointer to an array of 10 elements. So, the correct answer is: x is an array of three function pointers
Other Related PointsAn array of pointers in C is essentially an array where each element is a pointer. This allows you to create an ordered collection of pointers, and each pointer can point to a different location in memory. The declaration of an array of pointers involves specifying the type of the elements that the pointers will point to.
Q100: Match List I with List II
Choose the correct answer from the options given below:
(a) A - IV, B - III, C - II, D - I
(b) A - II, B - I, C - III, D - IV
(c) A - IV, B - III, C - I, D - II
(d) A - III, B - I, C - IV, D - II
Ans: C
Sol: The correct answer is A - IV, B - III, C - I, D - II
Scenario Testing (A-IV):
Regression Testing (B-III):
Component Testing (C-I):
Beta Testing (D-II):
1. What is the structure and pattern of the UGC NET Paper 2 for Computer Science? | ![]() |
2. How can candidates prepare effectively for the UGC NET Paper 2 in Computer Science? | ![]() |
3. What are the common topics covered in the UGC NET Paper 2 Computer Science syllabus? | ![]() |
4. Are there any specific eligibility criteria for appearing in the UGC NET Paper 2 for Computer Science? | ![]() |
5. What is the significance of the UGC NET qualification in the field of Computer Science? | ![]() |