Qus : 1
WB JECA MCA PYQ
4
Find out the wrong statement based on the characteristics of AVL tree data structure.
1
AVL tree is a binary search tree in nature.
2
AVL tree is known as height-balanced tree. 3
AVL tree has O(log₂ n) search time complexity considering ‘n’ as number of nodes. 4
AVL tree has O(n) search time complexity considering ‘n’ as number of nodes. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution AVL trees guarantee O(log n) search time, not O(n).
Qus : 8
WB JECA MCA PYQ
3
Which of the following statements about RAM is correct?
1
Type of non-volatile memory used for permanent data storage. 2
Retains data even when the power is turned off. 3
Volatile memory used for temporary storage during program execution. 4
Can only be read but not written to. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution RAM is volatile memory used for temporary storage during program execution.
Qus : 10
WB JECA MCA PYQ
2
Which of the following best distinguishes a sequential circuit from a combinational circuit?
1
Sequential circuits produce output based only on current inputs. 2
Sequential circuits use both current inputs and past states to determine output. 3
Combinational circuits have memory elements to store past states. 4
Combinational circuits require a clock signal to operate. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Sequential circuits depend on both current inputs and past states (memory), unlike combinational circuits.
Qus : 24
WB JECA MCA PYQ
2
Read the following statements about functions in C and choose the correct option:
(i) A function in C can return only one value directly.
(ii) Function names can be the same as variable names in the same scope.
(iii) A function must always take at least one argument.
(iv) Recursion is allowed in C functions.
1
All statements are correct. 2
Only statements (i) and (iv) are correct. 3
Only statements (ii) and (iii) are correct. 4
None of the statements are correct. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution (i) true, (ii) false, (iii) false, (iv) true.
Qus : 25
WB JECA MCA PYQ
1
In software engineering, a prototyping model can be used when __________.
1
Technical solutions are unclear to the development team
2
Technical solutions are clear to the development team 3
Models are unclear to the development team
4
Feasibility solutions are unclear to the development team
Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution Technical solutions are unclear to the development team
Qus : 26
WB JECA MCA PYQ
3
What happens when a recursive function in C lacks a proper base condition?
1
The function executes only once and terminates. 2
The compiler shows a syntax error. 3
It leads to infinite recursion and eventually a stack overflow. 4
The function automatically converts to an iterative form. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution No base condition → infinite recursion → stack overflow.
Qus : 38
WB JECA MCA PYQ
3
Which of the following statements about structures and unions in C is true?
1
In a structure, all members share the same memory location. 2
In a union, all members have separate memory locations. 3
The size of a union is equal to the size of its largest member. 4
The size of a structure is always equal to the sum of the sizes of its members, without any padding. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Union size = size of largest member; structure uses separate memory with padding.
Qus : 40
WB JECA MCA PYQ
1
What will be the output of the following program?
#include
int main()
{
char str1[20] = "Hello ";
char str2[20] = "Hello";
strcpy(str2, str1);
if (strcmp(str1, str2) == 0)
printf("Equal
");
else
printf("Not Equal
");
return 0;
}
1
Equal 2
Not Equal 3
Compiler Error 4
Undefined Behavior Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution After strcpy, both strings are same → strcmp returns 0 → Equal.
Qus : 69
WB JECA MCA PYQ
2
Which of the following points is/are not true about Linked List data structure when it is compared with an array?
1
Random access is not allowed in a typical implementation of Linked Lists. 2
Access of elements in Linked List takes less time than compared to arrays. 3
Arrays have better cache locality that can make them better in terms of performance. 4
It is easy to insert and delete elements in Linked List. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Access in linked list is slower than arrays.
Qus : 83
WB JECA MCA PYQ
1
Which of the following statements is true about paging and fragmentation?
1
Paging suffers from internal fragmentation but not external fragmentation. 2
Paging suffers from external fragmentation but not internal fragmentation. 3
Paging suffers from both internal and external fragmentation. 4
Paging does not suffer from any kind of fragmentation. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Paging removes external fragmentation but may have internal fragmentation.
Qus : 107
WB JECA MCA PYQ
1
Correct sequence of Risk Management process is
1
Identification → Assessment → Prioritization → Mitigation → Monitoring → Documentation. 2
Assessment → Identification → Prioritization → Mitigation → Monitoring → Documentation. 3
Identification → Assessment → Mitigation → Prioritization → Monitoring → Documentation. 4
Identification → Mitigation → Assessment → Prioritization → Monitoring → Documentation. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Standard RM sequence starts with identification then assessment.
Qus : 110
WB JECA MCA PYQ
3
What is the key benefit of using deep learning for tasks like recognizing images?
1
They need less training data than other methods. 2
They are easier to explain and understand than other models. 3
They can learn complex details from the data on their own. 4
They work faster and are more efficient computationally. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Deep learning captures complex patterns automatically.
Qus : 111
WB JECA MCA PYQ
1
What is the key difference between supervised and unsupervised learning?
1
Supervised learning requires labeled data, while unsupervised learning does not. 2
Supervised learning predicts labels, while unsupervised learning discovers patterns. 3
Supervised learning is used for classification, while unsupervised learning is used for regression. 4
Supervised learning is always more accurate than unsupervised learning. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Main difference is presence of labeled data.
Qus : 114
WB JECA MCA PYQ
1
In SVMs, the margin is defined as
1
The perpendicular distance from the decision boundary to the closest support vector. 2
The Euclidean distance between the two farthest data points in the dataset. 3
The difference in predicted probabilities between the two classes. 4
The perpendicular distance from any point to the hyperplane along the normal vector. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Margin = distance to closest support vector.
Qus : 120
WB JECA MCA PYQ
2
Five elements P, Q, R, S, T are pushed onto a stack starting from P. The stack is then popped 4 times, and each popped element is inserted into a queue. Two elements are then deleted from the queue and pushed back onto the stack. Finally, one element is popped from the stack. What will be the popped element?
1
P 2
Q 3
R 4
S Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Final popped element becomes Q after operations.
Qus : 121
WB JECA MCA PYQ
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 : 122
WB JECA MCA PYQ
4
Consider the following operations on a singly linked list initially containing the elements: 10 → 20 → 30 → 40
(i) Insert 15 after 10
(ii) Delete node containing 30
(iii) Insert 25 at end
(iv) Delete first node.
What will be the final sequence?
1
15 → 20 → 25 → 40 2
20 → 15 → 40 → 25 3
15 → 20 → 40 → 25 4
20 → 15 → 25 → 40 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Final list: 20 → 15 → 25 → 40.
Qus : 123
WB JECA MCA PYQ
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 : 125
WB JECA MCA PYQ
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 : 127
WB JECA MCA PYQ
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 : 130
WB JECA MCA PYQ
3
What is the output of the following C++ code?
#include
using namespace std;
class Base
{
public: virtual void show()
{
cout<<"Base";
}
};
class Derived: public Base
{
public: void show()
override{ cout<<"Derived"; }
};
int main()
{
Base* ptr;
Derived d;
ptr=&d;
ptr->show();
return 0;
}
1
Compilation error 2
Base 3
Derived 4
Runtime error Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Virtual function → Derived called.
Qus : 131
WB JECA MCA PYQ
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 : 132
WB JECA MCA PYQ
1
Which of the following are true about cyclomatic complexity?
1
It measures the number of independent paths in a program. 2
It measures the size of the program in lines of code. 3
Higher values indicate simpler code. 4
It is calculated as E − N + 2, where E is edges and N is nodes. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution Cyclomatic complexity counts independent paths; higher value = more complex.
Qus : 133
WB JECA MCA PYQ
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 : 135
WB JECA MCA PYQ
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 : 136
WB JECA MCA PYQ
4
In the context of Software Development Life Cycle (SDLC), which of the following statements is correct?
1
The Spiral model focuses only on risk identification and not on risk mitigation. 2
The Incremental model delivers the complete product only at the final iteration. 3
In the Waterfall model, requirements can be changed at any phase without impact. 4
The V-Model integrates testing activities corresponding to each development phase. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2025 PYQ
Solution V-model aligns testing with each development phase.
Qus : 137
WB JECA MCA PYQ
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 : 154
WB JECA MCA PYQ
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 : 156
WB JECA MCA PYQ
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 : 159
WB JECA MCA PYQ
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 : 167
WB JECA MCA PYQ
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 : 169
WB JECA MCA PYQ
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 : 177
WB JECA MCA PYQ
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 : 180
WB JECA MCA PYQ
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 : 183
WB JECA MCA PYQ
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 : 184
WB JECA MCA PYQ
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 : 185
WB JECA MCA PYQ
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 : 187
WB JECA MCA PYQ
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 : 188
WB JECA MCA PYQ
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
Qus : 190
WB JECA MCA PYQ
2
Which of the following statement is correct ?
1
Pre-order traversal of Binary search gives sorted list. 2
In-order traversal of Binary search tree gives sorted list. 3
Post-order traversal of Binary search tree gives sorted list. 4
None of the above. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: For a BST, only in-order traversal yields the keys in sorted order.
Answer: (B)
Qus : 194
WB JECA MCA PYQ
1
When several processes access the same data concurrently and the outcome depends on the particular order in which the access takes place is called ________.
1
Race condition 2
Critical condition 3
Virtual condition 4
Linear condition Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Order-dependent outcomes from concurrent access is a classic race condition .
Answer: (A) Race condition
Qus : 216
WB JECA MCA PYQ
3
What is the output of the following C program?
#include <stdio.h>
void main(){
int a = -7;
float b;
b = a++;
printf("%d, %f ", a, ++b);
} 1
-6, -7.000000 2
-5, -6 3
-6, -6.000000 4
-6, -6 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: The statement b = a++; assigns the current value of a (−7) to b and then increments a to −6.
Later, ++b increments b from −7 to −6 before printing.
$$ a = -6,\quad b = -6.000000 $$
Qus : 217
WB JECA MCA PYQ
4
What is the output?
#include <stdio.h>
void main(){
int i = -1;
printf("sizeof(i) = %d", sizeof(i));
} 1
Compiler Error 2
sizeof(i) = -1 3
sizeof(i) = 1 4
sizeof(i) = 4 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: The operator sizeof gives the size of the type in bytes, not the value.
On most 32-bit and 64-bit systems, sizeof(int) is 4.
$$ \text{Output: } \texttt{sizeof(i) = 4} $$
Qus : 218
WB JECA MCA PYQ
3
What is the output?
#include <stdio.h>
void main(){
int x = -1, y = 1, z = 0;
if(x && y++ && z)
++x, y++, --z;
printf("%d, %d, %d", x++, y++, z++);
} 1
0, 3, 0 2
Compiler Error 3
-1, 2, 0 4
1..0 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: In the condition x && y++ && z, since z = 0, the logical AND short-circuits and the body of the if is not executed.
However, y++ is evaluated before the short-circuit, so y becomes 2.
Values before printing:
$$ x = -1,\ y = 2,\ z = 0 $$
So the program prints:
$$ (-1,\ 2,\ 0) $$
Qus : 219
WB JECA MCA PYQ
1
What is the output?
#include <stdio.h>
enum colors{RED, BROWN, ORANGE};
void main(){
printf("%ld..%f..%d", RED, BROWN, ORANGE);
} 1
Compiler Error 2
0..0.000000..1 3
0..1.000000..2 4
Runtime Error Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: The format specifiers do not match the data types (%f is used for int).
This causes undefined behavior .
The program may compile, but the output is not reliable.
Correct choice: None of these .
Qus : 222
WB JECA MCA PYQ
3
What is the output?
#include <stdio.h>
void main(){
int **ptr;
int temp = 65;
ptr[0] = &temp;
printf("%d", ptr[0][0]);
} 1
Compiler error 2
65 3
Segmentation Fault 4
Runtime Error Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: The pointer ptr is uninitialized, so it does not point to valid memory.
When the code tries to access ptr[0], it attempts to dereference an invalid location.
This leads to undefined behavior, and in most cases results in a segmentation fault .
Qus : 223
WB JECA MCA PYQ
2
What is the output?
#include <stdio.h>
#include <stdlib.h>
void main(){
int *ptr;
ptr = (int*) calloc(3, sizeof(int));
ptr[2] = 30;
printf("%d", *ptr);
free(ptr);
} 1
30 2
0 3
calloc 4
Error Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: The function calloc initializes all allocated memory blocks with zero.
So ptr[0] is initialized to 0 .
The statement *ptr is equivalent to ptr[0].
$$ \text{Output: } 0 $$
Qus : 227
WB JECA MCA PYQ
1
13. BIOS means ______________.
(A) basic input/output system (B) best input/output system (C) basic input system (D) basic output system
1
basic input/output system 2
best input/output system 3
basic input system 4
basic output system Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: BIOS stands for Basic Input/Output System , firmware that initializes hardware and starts the boot process.
Qus : 229
WB JECA MCA PYQ
2
15. If only one process can be able to access a particular resource at a time, then it is known as ______________.
(A) Mutual execution (B) Mutual exclusion (C) Multiple execution (D) Multiple exclusion
1
Mutual execution 2
Mutual exclusion 3
Multiple execution 4
Multiple exclusion Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: Allowing only one process to access a resource at a time is called mutual exclusion (mutex).
Qus : 231
WB JECA MCA PYQ
4
17. Banker’s algorithm for resource allocation deals with ______________.
(A) mutual exclusion (B) mutual inclusion (C) deadlock recovery (D) deadlock avoidance
1
mutual exclusion 2
mutual inclusion 3
deadlock recovery 4
deadlock avoidance Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: Banker’s algorithm is a deadlock avoidance algorithm ensuring the system stays in a safe state.
Qus : 232
WB JECA MCA PYQ
2
18. Page fault means ______________.
(A) required page is available in main memory (B) required page is not available in main memory (C) segment number (D) reduce page I/O
1
required page is available in main memory 2
required page is not available in main memory 3
segment number 4
reduce page I/O Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: A page fault occurs when the referenced page is not present in main memory, forcing a page-in from secondary storage.
Qus : 234
WB JECA MCA PYQ
3
20. Demand paging is considered as ______________.
(A) fetching a page when not needed (B) switching between two processes (C) fetching a page only when needed (D) switching between two threads
1
fetching a page when not needed 2
switching between two processes 3
fetching a page only when needed 4
switching between two threads Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: In demand paging , a page is loaded into memory only when it is actually referenced.
Qus : 235
WB JECA MCA PYQ
4
21. Thrashing means a condition having ______________.
(A) minimum paging (B) optimized paging (C) synchronized paging (D) excessive paging
1
minimum paging 2
optimized paging 3
synchronized paging 4
excessive paging Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: Thrashing occurs when the system spends most time paging due to insufficient frames, causing excessive paging and poor performance.
Qus : 236
WB JECA MCA PYQ
2
22. A counting semaphore is initialized to 15. Then, 4 wait operations and 2 signal operations are completed on this semaphore. The resulting value of the semaphore is ____________.
(A) 11 (B) 13 (C) 17 (D) 19
1
11 2
13 3
17 4
19 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: Each wait (P) decrements; each signal (V) increments.
Initial: 15 → after 4 waits: 11 → after 2 signals: 13.
$$ 15 - 4 + 2 = 13 $$
Qus : 238
WB JECA MCA PYQ
4
24. In file management, FAT means ______________.
(A) Feature Access Table (B) File Access Table (C) Fault Allocation Table (D) File Allocation Table
1
Feature Access Table 2
File Access Table 3
Fault Allocation Table 4
File Allocation Table Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution
Explanation: FAT stands for File Allocation Table , a file system layout used to map files to disk clusters.
Qus : 239
WB JECA MCA PYQ
1
25.What is the output of the following program ? include <iostream> using namespace std; int addition (int a, int b) { return a+b; } double addition (double a, double b) { return a+b; } int main () { cout<< addition (35,20) << “;”; cout<< addition (34.1,12.7); return 0; }
1
55;46.8 2
Compile Error 3
Runtime Error 4
Segmentation Fault Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution The given program defines two overloaded functions `addition`:
1. `int addition(int a, int b)` → returns integer sum
2. `double addition(double a, double b)` → returns double sum
In `main()`:
- `addition(35,20)` calls the integer version → 35 + 20 = 55
- `addition(34.1,12.7)` calls the double version → 34.1 + 12.7 = 46.8
Therefore, the output is:
55;46.8
Qus : 240
WB JECA MCA PYQ
1
26.What is the output of the following program ? #include <iostream> using namespace std; template <class C1, class C2> bool is_equal (C1 var1, C2 var2) { return (var1 = = var2); } int main () { if (is_equal(10,10.0)) cout<< “Equal”; else cout<< “Not equal”; return 0; }
1
Equal 2
Not equal 3
Compile Error 4
Runtime Error Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution The function `is_equal` is a template that compares two variables of possibly different types.
In `main()`, we call `is_equal(10, 10.0)`.
- `10` is an integer (int).
- `10.0` is a double.
C++ allows implicit type conversion during comparison.
So, `10 == 10.0` evaluates to `true`.
Therefore, the condition in the `if` statement is true, and the output will be:
Equal
Qus : 241
WB JECA MCA PYQ
1
26.What is the output of the following program ?
#include <iostream>
using namespace std;
int main()
{
int var = 0;
while (var < 10)
{
cout << var << " ";
var++;
}
cout << var;
return 0;
}
1
0 1 2 3 4 5 6 7 8 9 10 2
0 1 2 3 4 5 6 7 8 9 3
1 2 3 4 5 6 7 8 9 10 4
1 2 3 4 5 6 7 8 9 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution Output:
0 1 2 3 4 5 6 7 8 9 10
Explanation:
The variable var starts at 0.
The while (var < 10) loop prints 0 1 2 3 4 5 6 7 8 9 with spaces.
When var reaches 10, the loop stops.
After the loop, cout << var; prints 10.
Final output:
Qus : 242
WB JECA MCA PYQ
1
What is the output of the following program ?
#include <iostream>
using namespace std;
struct demo
{
int var;
};
int main()
{
demo str;
demo *ptr;
str.var = 100;
ptr = &str;
cout << ptr->var;
return 0;
}
1
100 2
Memory address of var 3
Compile Error 4
L-value Error Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution Output:
100
Explanation:
str.var = 100; assigns 100 to the structure variable.
ptr = &str; makes the pointer point to str.
ptr->var accesses the member var of structure str via pointer.
Hence it prints 100.
Qus : 243
WB JECA MCA PYQ
1
29.What is the output of the following program ?
#include <iostream>
using namespace std;
int main ()
{
int c1 = 10;
int c2 = 20;
{
int c1;
c1 = 50;
c2 = 50;
cout << "c1= " << c1 << ", c2=" << c2;
}
cout << ", c1= " << c1 << ", c2=" << c2;
return 0;
}
1
c1= 50, c2= 50; c1= 10, c2= 50 2
c1= 10, c2= 20; c1= 10, c2= 20 3
c1= 50, c2= 50; c1= 10, c2= 20 4
c1= 10, c2= 20; c1= 10, c2= 50 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution Output:
c1= 50, c2=50, c1= 10, c2=50
Explanation:
Outer c1 = 10, c2 = 20.
Inside the inner block, a new local c1 is declared (shadowing outer c1).
Inner c1 = 50, and c2 (outer one) is updated to 50.
First cout prints → c1= 50, c2=50.
After the block ends, inner c1 is destroyed. Outer c1 remains 10, while outer c2 is 50.
Second cout prints → , c1= 10, c2=50.
? Final output: c1= 50, c2=50, c1= 10, c2=50.
Qus : 246
WB JECA MCA PYQ
2
32.What is the output of the following program ?
#include <iostream>
using namespace std;
int main()
{
int var = 2;
do
{
cout << var;
} while (var--);
return 0;
}
1
21 2
210 3
2 4
1 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution Explanation:
Initially var = 2.
First iteration: prints 2, then var-- makes var = 1.
Second iteration: prints 1, then var-- makes var = 0.
Third iteration: prints 0, then var-- makes var = -1. Condition fails and loop exits.
So output is:
[{"qus_id":"12632","year":"2024"},{"qus_id":"12633","year":"2024"},{"qus_id":"12634","year":"2024"},{"qus_id":"12635","year":"2024"},{"qus_id":"12636","year":"2024"},{"qus_id":"12637","year":"2024"},{"qus_id":"12638","year":"2024"},{"qus_id":"12639","year":"2024"},{"qus_id":"12640","year":"2024"},{"qus_id":"12641","year":"2024"},{"qus_id":"12642","year":"2024"},{"qus_id":"12643","year":"2024"},{"qus_id":"12644","year":"2024"},{"qus_id":"12645","year":"2024"},{"qus_id":"12646","year":"2024"},{"qus_id":"12647","year":"2024"},{"qus_id":"12648","year":"2024"},{"qus_id":"12649","year":"2024"},{"qus_id":"12650","year":"2024"},{"qus_id":"12651","year":"2024"},{"qus_id":"12652","year":"2024"},{"qus_id":"12653","year":"2024"},{"qus_id":"12654","year":"2024"},{"qus_id":"12655","year":"2024"},{"qus_id":"12656","year":"2024"},{"qus_id":"12657","year":"2024"},{"qus_id":"12658","year":"2024"},{"qus_id":"12659","year":"2024"},{"qus_id":"12660","year":"2024"},{"qus_id":"12661","year":"2024"},{"qus_id":"12662","year":"2024"},{"qus_id":"12663","year":"2024"},{"qus_id":"12664","year":"2024"},{"qus_id":"12666","year":"2024"},{"qus_id":"12667","year":"2024"},{"qus_id":"12668","year":"2024"},{"qus_id":"12669","year":"2024"},{"qus_id":"12670","year":"2024"},{"qus_id":"12671","year":"2024"},{"qus_id":"12672","year":"2024"},{"qus_id":"12673","year":"2024"},{"qus_id":"12674","year":"2024"},{"qus_id":"12675","year":"2024"},{"qus_id":"12676","year":"2024"},{"qus_id":"12677","year":"2024"},{"qus_id":"12678","year":"2024"},{"qus_id":"12679","year":"2024"},{"qus_id":"12680","year":"2024"},{"qus_id":"12681","year":"2024"},{"qus_id":"12682","year":"2024"},{"qus_id":"12683","year":"2024"},{"qus_id":"12685","year":"2024"},{"qus_id":"12685","year":"2024"},{"qus_id":"12686","year":"2024"},{"qus_id":"12687","year":"2024"},{"qus_id":"12688","year":"2024"},{"qus_id":"12689","year":"2024"},{"qus_id":"12690","year":"2024"},{"qus_id":"12691","year":"2024"},{"qus_id":"12692","year":"2024"},{"qus_id":"12693","year":"2024"},{"qus_id":"12694","year":"2024"},{"qus_id":"12695","year":"2024"},{"qus_id":"12696","year":"2024"},{"qus_id":"12697","year":"2024"},{"qus_id":"12698","year":"2024"},{"qus_id":"12699","year":"2024"},{"qus_id":"12700","year":"2024"},{"qus_id":"12701","year":"2024"},{"qus_id":"12702","year":"2024"},{"qus_id":"12703","year":"2024"},{"qus_id":"12704","year":"2024"},{"qus_id":"12705","year":"2024"},{"qus_id":"12706","year":"2024"},{"qus_id":"12707","year":"2024"},{"qus_id":"12708","year":"2024"},{"qus_id":"12709","year":"2024"},{"qus_id":"12710","year":"2024"},{"qus_id":"12711","year":"2024"},{"qus_id":"12756","year":"2023"},{"qus_id":"12757","year":"2023"},{"qus_id":"12758","year":"2023"},{"qus_id":"12759","year":"2023"},{"qus_id":"12760","year":"2023"},{"qus_id":"12761","year":"2023"},{"qus_id":"12762","year":"2023"},{"qus_id":"12763","year":"2023"},{"qus_id":"12764","year":"2023"},{"qus_id":"12765","year":"2023"},{"qus_id":"12766","year":"2023"},{"qus_id":"12767","year":"2023"},{"qus_id":"12768","year":"2023"},{"qus_id":"12769","year":"2023"},{"qus_id":"12770","year":"2023"},{"qus_id":"12771","year":"2023"},{"qus_id":"12772","year":"2023"},{"qus_id":"12773","year":"2023"},{"qus_id":"12774","year":"2023"},{"qus_id":"12775","year":"2023"},{"qus_id":"12776","year":"2023"},{"qus_id":"12777","year":"2023"},{"qus_id":"12778","year":"2023"},{"qus_id":"12779","year":"2023"},{"qus_id":"12780","year":"2023"},{"qus_id":"12781","year":"2023"},{"qus_id":"12782","year":"2023"},{"qus_id":"12783","year":"2023"},{"qus_id":"12784","year":"2023"},{"qus_id":"12785","year":"2023"},{"qus_id":"12786","year":"2023"},{"qus_id":"12787","year":"2023"},{"qus_id":"12788","year":"2023"},{"qus_id":"12789","year":"2023"},{"qus_id":"12790","year":"2023"},{"qus_id":"12791","year":"2023"},{"qus_id":"12792","year":"2023"},{"qus_id":"12793","year":"2023"},{"qus_id":"12794","year":"2023"},{"qus_id":"12795","year":"2023"},{"qus_id":"12796","year":"2023"},{"qus_id":"12797","year":"2023"},{"qus_id":"12798","year":"2023"},{"qus_id":"12799","year":"2023"},{"qus_id":"12800","year":"2023"},{"qus_id":"12801","year":"2023"},{"qus_id":"12802","year":"2023"},{"qus_id":"12803","year":"2023"},{"qus_id":"12804","year":"2023"},{"qus_id":"12805","year":"2023"},{"qus_id":"12806","year":"2023"},{"qus_id":"12807","year":"2023"},{"qus_id":"12808","year":"2023"},{"qus_id":"12809","year":"2023"},{"qus_id":"12810","year":"2023"},{"qus_id":"12811","year":"2023"},{"qus_id":"12812","year":"2023"},{"qus_id":"12813","year":"2023"},{"qus_id":"12814","year":"2023"},{"qus_id":"12815","year":"2023"},{"qus_id":"12816","year":"2023"},{"qus_id":"12817","year":"2023"},{"qus_id":"12818","year":"2023"},{"qus_id":"12819","year":"2023"},{"qus_id":"12821","year":"2023"},{"qus_id":"12822","year":"2023"},{"qus_id":"12823","year":"2023"},{"qus_id":"12824","year":"2023"},{"qus_id":"12825","year":"2023"},{"qus_id":"12826","year":"2023"},{"qus_id":"12827","year":"2023"},{"qus_id":"12828","year":"2023"},{"qus_id":"12829","year":"2023"},{"qus_id":"12830","year":"2023"},{"qus_id":"12820","year":"2023"},{"qus_id":"12831","year":"2023"},{"qus_id":"12832","year":"2023"},{"qus_id":"12833","year":"2023"},{"qus_id":"12834","year":"2023"},{"qus_id":"12835","year":"2023"},{"qus_id":"17668","year":"2025"},{"qus_id":"17669","year":"2025"},{"qus_id":"17670","year":"2025"},{"qus_id":"17671","year":"2025"},{"qus_id":"17672","year":"2025"},{"qus_id":"17673","year":"2025"},{"qus_id":"17674","year":"2025"},{"qus_id":"17676","year":"2025"},{"qus_id":"17675","year":"2025"},{"qus_id":"17677","year":"2025"},{"qus_id":"17678","year":"2025"},{"qus_id":"17679","year":"2025"},{"qus_id":"17680","year":"2025"},{"qus_id":"17681","year":"2025"},{"qus_id":"17682","year":"2025"},{"qus_id":"17683","year":"2025"},{"qus_id":"17684","year":"2025"},{"qus_id":"17685","year":"2025"},{"qus_id":"17686","year":"2025"},{"qus_id":"17687","year":"2025"},{"qus_id":"17688","year":"2025"},{"qus_id":"17689","year":"2025"},{"qus_id":"17690","year":"2025"},{"qus_id":"17691","year":"2025"},{"qus_id":"17692","year":"2025"},{"qus_id":"17693","year":"2025"},{"qus_id":"17695","year":"2025"},{"qus_id":"17694","year":"2025"},{"qus_id":"17696","year":"2025"},{"qus_id":"17697","year":"2025"},{"qus_id":"17698","year":"2025"},{"qus_id":"17699","year":"2025"},{"qus_id":"17700","year":"2025"},{"qus_id":"17701","year":"2025"},{"qus_id":"17702","year":"2025"},{"qus_id":"17703","year":"2025"},{"qus_id":"17704","year":"2025"},{"qus_id":"17705","year":"2025"},{"qus_id":"17706","year":"2025"},{"qus_id":"17707","year":"2025"},{"qus_id":"17708","year":"2025"},{"qus_id":"17709","year":"2025"},{"qus_id":"17710","year":"2025"},{"qus_id":"17711","year":"2025"},{"qus_id":"17712","year":"2025"},{"qus_id":"17713","year":"2025"},{"qus_id":"17714","year":"2025"},{"qus_id":"17715","year":"2025"},{"qus_id":"17716","year":"2025"},{"qus_id":"17717","year":"2025"},{"qus_id":"17718","year":"2025"},{"qus_id":"17719","year":"2025"},{"qus_id":"17720","year":"2025"},{"qus_id":"17721","year":"2025"},{"qus_id":"17722","year":"2025"},{"qus_id":"17723","year":"2025"},{"qus_id":"17724","year":"2025"},{"qus_id":"17725","year":"2025"},{"qus_id":"17726","year":"2025"},{"qus_id":"17727","year":"2025"},{"qus_id":"17728","year":"2025"},{"qus_id":"17729","year":"2025"},{"qus_id":"17730","year":"2025"},{"qus_id":"17731","year":"2025"},{"qus_id":"17732","year":"2025"},{"qus_id":"17733","year":"2025"},{"qus_id":"17734","year":"2025"},{"qus_id":"17735","year":"2025"},{"qus_id":"17736","year":"2025"},{"qus_id":"17737","year":"2025"},{"qus_id":"17738","year":"2025"},{"qus_id":"17739","year":"2025"},{"qus_id":"17740","year":"2025"},{"qus_id":"17741","year":"2025"},{"qus_id":"17742","year":"2025"},{"qus_id":"17743","year":"2025"},{"qus_id":"17744","year":"2025"},{"qus_id":"17745","year":"2025"},{"qus_id":"17746","year":"2025"},{"qus_id":"17747","year":"2025"},{"qus_id":"17748","year":"2025"},{"qus_id":"17749","year":"2025"},{"qus_id":"17750","year":"2025"},{"qus_id":"17751","year":"2025"},{"qus_id":"17752","year":"2025"},{"qus_id":"17753","year":"2025"},{"qus_id":"17754","year":"2025"},{"qus_id":"17755","year":"2025"},{"qus_id":"17756","year":"2025"},{"qus_id":"17757","year":"2025"},{"qus_id":"17758","year":"2025"},{"qus_id":"17759","year":"2025"},{"qus_id":"17760","year":"2025"},{"qus_id":"17761","year":"2025"},{"qus_id":"17762","year":"2025"},{"qus_id":"17763","year":"2025"},{"qus_id":"17764","year":"2025"},{"qus_id":"17765","year":"2025"},{"qus_id":"17766","year":"2025"},{"qus_id":"17767","year":"2025"}]