What is the primary purpose of a hash function in a hash table data structure?
MCQ Subject: Computer Science
-
In Compiler Design, what is the primary purpose of semantic actions during…
In Compiler Design, what is the primary purpose of semantic actions during syntax analysis?
-
A macro assembler primarily differs from a compiler in that it ___________.
A macro assembler primarily differs from a compiler in that it ___________.
-
A disease affects 1% of a population. A test for it is…
A disease affects 1% of a population. A test for it is 95% sensitive (true positive rate) and 90% specific (true negative rate). If someone tests positive, what is the approximate probability they actually have the disease?
-
Consider the function `void modify_ptr(int *ptr) { ptr = malloc(sizeof(int)); }`. If…
Consider the function `void modify_ptr(int *ptr) { ptr = malloc(sizeof(int)); }`. If called as `modify_ptr(&x)`, what happens to `x` after the function call?
-
In Compiler Design, which type of grammar in the Chomsky hierarchy requires…
In Compiler Design, which type of grammar in the Chomsky hierarchy requires a linear bounded automaton for parsing and can generate languages that are more complex than those produced by context-free grammars?
-
To ensure mutual exclusion for two processes accessing a shared resource using…
To ensure mutual exclusion for two processes accessing a shared resource using a binary semaphore, it must be initialized to:
-
Which graph traversal technique visits a node, then explores as far as…
Which graph traversal technique visits a node, then explores as far as possible along its edges before backtracking?
-
Which sorting algorithm guarantees O(n log n) time complexity in all cases,…
Which sorting algorithm guarantees O(n log n) time complexity in all cases, making it efficient for sorting very large datasets?
-
A database relation has a composite key and some non-key attributes depend…
A database relation has a composite key and some non-key attributes depend on only one part of the key. To eliminate partial dependencies and ensure no transitive dependencies, the relation should be normalized to which form?