✅ WBJEE JECA Computer Applications – Mock Test 2
1. What will be the output of printf("%d", 5+2*3);?
a. 21
b. 11
c. 17
d. 13
Answer: b
2. int a[5] = {1, 2}; - what's the value of a[4]?
a. 0
b. Garbage
c. 2
d. 1
Answer: a
3. The correct syntax for pointer declaration is:
a. ptr* int;
b. *int ptr;
c. int ptr;
d. pointer int;
Answer: c
4. Which function is used to read a character from keyboard?
a. getchar()
b. scanf()
c. getch()
d. readchar()
5. A function that calls itself is known as:
a. Recursive
b. Repeating
c. Static
d. Inline
Answer: a
6. Constructor is invoked when:
a. Object is destroyed
b. Object is created
c. Function is called
d. Class is inherited
Answer: b
7. Which feature allows the same function to behave differently?
a. Inheritance
b. Polymorphism
c. Encapsulation
d. Abstraction
Answer: b
8. A pure virtual function is declared by:
a. virtual void f();
b. void f() = 0;
c. virtual void f() = 0;
d. abstract void f();
Answer: c
9. What does friend keyword do in C++?
a. Public inheritance
b. Provides encapsulation
c. Grants access to private members
d. Denies access
Answer: c
10. Static members of a class are:
a. Object-specific
b. Class-wide
c. Global
d. Constant
Answer: b
11. Command to show current directory:
a. pwd
b. ls
c. cd
d. dir
Answer: a
12. chmod 755 file.txt means:
a. Owner: read/write/execute, Group/Others: read/execute
b. Full access
c. Read only
d. No permission
Answer: a
13. grep command is used for:
a. Copying files
b. Deleting files
c. Pattern matching
d. Creating files
Answer: c
14. Which command shows running processes?
a. top
b. pwd
c. kill
d. chmod
Answer: a
15. Shell script file has extension:
a. .txt
b. .cpp
c. .sh
d. .bin
Answer: c
16. Which of the following is LIFO?
a. Queue
b. Stack
c. Linked List
d. Tree
Answer: b
17. A queue works on:
a. LIFO
b. FIFO
c. FILO
d. Random
Answer: b
18. Which traversal gives sorted output in BST?
a. Preorder
b. Postorder
c. Inorder
d. Level order
Answer: c
19. Best case time complexity of binary search:
a. O(1)
b. O(n)
c. O(log n)
d. O(n^2)
Answer: a
20. Circular queue avoids:
a. Recursion
b. Repetition
c. Wastage of memory
d. Duplicate values
Answer: c
21. A process is:
a. A running program
b. A compiler
c. A CPU instruction
d. A storage location
Answer: a
22. Which of the following is not a state of process?
a. New
b. Ready
c. Completed
d. Finished
Answer: d
23. Which is not a CPU scheduling algorithm?
a. Round Robin
b. FCFS
c. LRU
d. Priority
Answer: c
24. Deadlock can occur when:
a. Mutual exclusion exists
b. Resources are shared
c. CPU is idle
d. Threads are not used
Answer: a
25. Page fault occurs when:
a. Page is in RAM
b. Page is in cache
c. Page is not in RAM
d. CPU is busy
Answer: c
26. Primary key must be:
a. NULL
b. Unique
c. Duplicate
d. Foreign
Answer: b
27. Which of the following is not a SQL command?
a. SELECT
b. DELETE
c. INSERT
d. COPY
Answer: d
28. Full form of ER diagram:
a. Entity Report
b. Entity Relationship
c. Entry Record
d. Entity Result
Answer: b
29. 3NF removes:
a. Partial dependency
b. Transitive dependency
c. Functional dependency
d. Redundancy
Answer: b
30. SQL is:
a. Structured Query Language
b. Sequential Query Language
c. Simple Query Logic
d. Strong Query Logic
Answer: a
31. IP address is:
a. Software
b. Protocol
c. Logical address
d. Physical address
Answer: c
32. TCP is:
a. Connectionless
b. Reliable
c. UDP-based
d. Fast but error-prone
Answer: b
33. Port number of HTTP:
a. 21
b. 25
c. 80
d. 110
Answer: c
34. Router works on which layer?
a. Application
b. Transport
c. Network
d. Data Link
Answer: c
35. DNS is used to:
a. Block sites
b. Translate domain to IP
c. Encrypt messages
d. Route traffic
Answer: b
36. Waterfall model is:
a. Iterative
b. Sequential
c. Agile
d. Spiral
Answer: b
37. Which one is not a software process model?
a. Waterfall
b. Spiral
c. RAD
d. Bubble
Answer: d
38. Requirements gathering is part of:
a. Design
b. Testing
c. Analysis
d. Maintenance
Answer: c
39. Which diagram shows data flow?
a. ER diagram
b. DFD
c. Flowchart
d. Use-case
Answer: b
40. Risk management involves:
a. Identifying risk
b. Planning response
c. Monitoring
d. All of these
41. Which is a supervised learning algorithm?
a. K-means
b. Decision tree
c. PCA
d. Apriori
Answer: b
42. SVM stands for:
a. Support Vector Machine
b. Simple Vector Method
c. Sample Value Matrix
d. Statistical Value Machine
Answer: a
43. ANN is modeled on:
a. Brain
b. Tree
c. Animal
d. Computer
Answer: a
44. What is the goal of clustering?
a. Classification
b. Grouping similar data
c. Regression
d. Learning from labels
Answer: b
45. In ML, overfitting refers to:
a. Too little data
b. Too many features
c. Model fits noise
d. Data loss
Answer: c
46. RAM is:
a. Non-volatile
b. Permanent
c. Volatile
d. None
Answer: c
47. In programming, typedef is used for:
a. Loops
b. Data abstraction
c. Creating aliases
d. Function pointer
Answer: c
48. A class in C++ contains:
a. Only variables
b. Only functions
c. Data and functions
d. Only constructors
Answer: c
49. OS that supports more than one user at a time:
a. Real-time
b. Single-user
c. Multi-user
d. Batch
Answer: c
50. SQL command to remove a table:
a. DELETE TABLE
b. REMOVE TABLE
c. DROP TABLE
d. ERASE TABLE
Answer: c