Qus : 1
WB JECA MCA PYQ 2024
1
What is the output of the following code snippet?
#include <stdio.h>
main() {
int x = 65, *p = &x;
void *q = p;
char *r = q;
printf("%c", *r);
} (A) $A$
(B) $Z$
(C) $65$
(D) None of the above
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Step 1: Initialization
$x = 65$
In ASCII, $65 \equiv A$
Step 2: Pointer flow
$p = \&x \;\; \rightarrow$ pointer to integer
$q = p \;\; \rightarrow$ void pointer
$r = q \;\; \rightarrow$ typecast to char pointer
Step 3: Dereferencing
Since r is char*, it reads 1 byte .
The value stored = $65$
Step 4: Printing
printf("%c", *r); prints character with ASCII $65$.
Hence, the output is:
$\; \boxed{A} \;$
Correct Answer: (A)
Qus : 2
WB JECA MCA PYQ 2024
1
ROM is a
(A) Combinational Circuit
(B) Static Circuit
(C) Sequential Circuit
(D) Magnetic Circuit
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
- ROM (Read Only Memory) stores fixed data permanently.
- Its output depends only on the given input address.
- No clock or feedback is required, so it is not sequential .
- Hence, ROM is a Combinational Circuit .
Correct Answer: (A) Combinational Circuit
Qus : 3
WB JECA MCA PYQ 2024
1
Each stage in pipelining should be completed within _________cycles.
(A) 1
(b) 2
(C) 3
(D) 4
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
In pipelining, the CPU instruction is divided into stages (Fetch, Decode, Execute, etc.). To maximize throughput, each stage must complete within 1 clock cycle . This ensures that new instructions can enter the pipeline without delay.
Correct Answer: (A) 1
Qus : 4
WB JECA MCA PYQ 2024
2
Relational calculus is a
(A) Procedural language
(B) Non-procedural language
(C) Data definition language
(D) High-level language
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Relational Algebra is procedural (it specifies how to obtain the result).Relational Calculus is non-procedural (it specifies what to obtain, not how).Therefore, Relational Calculus is a
Non-procedural language .
Correct Answer: (B) Non-procedural language
Qus : 6
WB JECA MCA PYQ 2024
3
An artificially intelligent car decreases its speed based on its distance from the car in front of it. Which method is used?
(A) Naive Bayes
(B) Decision Tree
(C) Linear Regression
(D) Logistic Regression
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
The car’s speed is a continuous variable that depends on the distance from the car ahead. To model this relation, we need a method for predicting a continuous outcome. Linear Regression is used because it maps distance (input) to speed (output).
Correct Answer: (C) Linear Regression
Qus : 7
WB JECA MCA PYQ 2024
2
The keyword friend does not appear in
(A) the class allowing access to another class.
(B) the class desiring access to another class.
(C) the private section of a class.
(D) the public section of a class.
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
The friend keyword is used inside a class definition to allow another class or function to access its private/protected members. It appears in the class granting access (not the one desiring access). It can be declared in either public or private section of that class. Hence, it
does not appear in the class desiring access .
Correct Answer: (B) the class desiring access to another class
Qus : 8
WB JECA MCA PYQ 2024
4
What is the maximum number of level-2 DFD possible if the number of
processes in level-1 DFD is n ?
(A) $\frac{n}{2}$
(B) 2
(C) $n^2$
(D) n
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
In a Data Flow Diagram (DFD), each process in level-1 can be decomposed further into its own level-2 diagram. Therefore, if there are
n processes at level-1, then maximum possible level-2 DFDs =
n .
Correct Answer: (D) $n$
Qus : 9
WB JECA MCA PYQ 2024
4
The small extremely fast RAM's are termed as ______
(A) Heap
(B) Accumulators
(C) Stack
(D) Cache
1
A 2
B 3
C 4
D Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Heap → Memory area for dynamic allocation.Accumulator → Register in CPU for intermediate results.Stack → Memory area used for function calls and local variables.Cache → Small, high-speed RAM located close to the CPU, used to store frequently accessed data.Hence, the correct answer is
Cache .
Correct Answer: (D) Cache
Qus : 18
WB JECA MCA PYQ 2024
4
What is the output of the following C-program?\n#include\n#define CUBE(x) (x*x*x)\nint main() { int a, b=3; a = CUBE(b++); printf("%d, %d\n", a, b); return 0; }
1
9, 4 2
27, 4 3
27, 6 4
Error Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution:
- Macro expansion: CUBE(b++) → (b++ * b++ * b++).
- This causes multiple side effects → undefined behavior.
- Most compilers treat this as error/undefined .
Answer = (D) Error
Qus : 20
WB JECA MCA PYQ 2024
3
What is the purpose of the confusion matrix in machine learning?
1
To visualize the distribution of the data in a dataset 2
To compare the performance of different models 3
To evaluate the performance of a classification model 4
To evaluate the performance of a regression model Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution:
- Confusion matrix is used in classification tasks .
- It compares predicted vs actual labels (TP, FP, TN, FN).
Answer = (C) To evaluate the performance of a classification model
Qus : 23
WB JECA MCA PYQ 2024
1
Which among the following can’t be used for polymorphism?
1
Static member functions 2
Member functions overloading 3
Predefined operator overloading 4
Constructor overloading Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Static member functions cannot be virtual ; hence they don’t participate in runtime polymorphism.
Overloading (functions/operators/constructors) supports polymorphism.Answer: (A) Static member functions
Qus : 31
WB JECA MCA PYQ 2024
3
Which of the following is an example of a classification problem?
1
Predicting the price of a house based on its features 2
Predicting the weight of a person based on their height 3
Predicting whether a customer will churn or not 4
Predicting the age of a person based on their income Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Classification predicts categories . Customer churn = Yes/No ⇒ classification.
Answer: (C) Predicting whether a customer will churn or not
Qus : 33
WB JECA MCA PYQ 2024
1
What is the difference between supervised and unsupervised learning?
1
Supervised learning requires labelled data while unsupervised learning does not. 2
Unsupervised learning requires labelled data while supervised learning does not. 3
Supervised learning does not require data while unsupervised learning does. 4
There is no difference between supervised and unsupervised learning. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Supervised = labelled data, Unsupervised = unlabelled data.
Answer: (A) Supervised learning requires labelled data while unsupervised learning does not.
Qus : 41
WB JECA MCA PYQ 2024
2
Given an unsorted array where each element is at most k distance from its position in a sorted array. Which sorting algorithm can be easily modified for this and what is its time complexity?
1
Insertion Sort with O(kn) 2
Heap Sort with O(n log k) 3
Quick Sort with O(k log k) 4
Merge Sort with O(k log k) Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: A k-sorted array can be efficiently sorted using a min-heap of size k, yielding O(n log k) time.
Answer: (B) Heap Sort with O(n log k)
Qus : 44
WB JECA MCA PYQ 2024
2
A process is thrashing if ____.
1
it spends more time in execution, rather than paging 2
it spends more time in paging, rather than in execution 3
it has no memory allocated to it 4
it indefinitely waits for a resource Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Thrashing occurs when the CPU spends most of its time handling page faults rather than executing instructions.
Answer: (B) it spends more time in paging, rather than in execution
Qus : 47
WB JECA MCA PYQ 2024
1
In a relational database, what does the term "ACID" stand for?
1
Atomicity, Consistency, Integrity, Durability 2
Association, Constraint, Index, Database 3
Authorization, Compatibility, Isolation, Dependency 4
Aggregate, Collection, Inheritance, Design Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: ACID properties are Atomicity, Consistency, Isolation, Durability. Option (A) is closest (Integrity ~ Isolation).
Answer: (A) Atomicity, Consistency, Integrity, Durability
Qus : 48
WB JECA MCA PYQ 2024
3
Which of the given statement is the correct recurrence for the worst case of Binary Search?
1
T(n) = 2T(n/2) + O(1) & T(1)=O(1)=T(0) 2
T(n) = T(n-1) + O(1) & T(1)=O(1)=T(0) 3
T(n) = T(n/2) + O(1) & T(1)=T(0)=O(1) 4
T(n) = T(n-2) + O(1) & T(1)=O(1) Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Binary search recurrence is T(n) = T(n/2) + O(1) . Base case T(1)=O(1).
Answer: (C) T(n) = T(n/2) + O(1)
Qus : 49
WB JECA MCA PYQ 2024
2
Which of the following statements about primary key in a database table is true?
1
A table can have multiple primary keys. 2
A primary key uniquely identifies each record in a table. 3
Primary keys can contain NULL values. 4
Primary keys are used to establish relationships between tables. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: A table can have only one primary key, it cannot contain NULLs. Its main property: uniquely identifies each record .
Answer: (B) A primary key uniquely identifies each record in a table
Qus : 51
WB JECA MCA PYQ 2024
4
Which is the correct statement about operator overloading ?
1
Only arithmetic operators can be overloaded. 2
Only non-arithmetic operators can be overloaded. 3
Precedence of operators are changed after overloading. 4
Associativity and precedence of operators does not change. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Overloading changes operator meaning for user types, but its precedence and associativity never change .
Answer: (D)
Qus : 52
WB JECA MCA PYQ 2024
3
Numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The tree uses usual ordering. What is the in-order traversal sequence?
1
7, 5, 1, 0, 3, 2, 4, 6, 8, 9 2
0, 2, 4, 3, 1, 6, 5, 9, 8, 7 3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 4
9, 8, 6, 4, 2, 3, 0, 1, 5, 7 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: In-order traversal of a BST gives the sorted order of keys ⇒ 0 to 9 ascending.
Answer: (C) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
""