240,000+ Validated MCQs across 43 Subject Categories

MCQ Bank & Interactive Mock Engine

Practice subject-wise questions with instant feedback and verified explanations, or test your readiness in our timed 15-minute FPSC & PPSC screening exam simulator.

Showing 76 Questions
Computer Structure And Union
Academic Verified

Q1. What will be the output of the following C code? #include <stdio.h> struct p { unsigned int x : 2; unsigned int y : 2; }; int main() { struct p p; p.x = 3; p.y = 1; printf("%d\n", sizeof(p)); }

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Structure And Union).

Computer Structure And Union
Academic Verified

Q2. What will be the output of the following C code? #include <stdio.h> struct p { unsigned int x : 7; unsigned int y : 2; }; int main() { struct p p; p.x = 110; p.y = 2; printf("%d\n", p.x); }

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Structure And Union).

Computer Structure And Union
Academic Verified

Q3. What will be the output of the following C code? #include <stdio.h> typedef struct student { char *a; }stu; void main() { struct stu s; s.a = "hi"; printf("%s", s.a); }

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Structure And Union).

Computer Structure And Union
Academic Verified

Q4. Which option is not possible for the following function call? func(&s.a); //where s is a variable of type struct and a is the member of the struct.

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Structure And Union).

Computer Structures And Unions In C Plus Plus
Academic Verified

Q5. What is the difference between a structure and a union in C++?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Structures And Unions In C Plus Plus).

Computer Structures And Unions In C Plus Plus
Academic Verified

Q6. What will be the output of the following C++ code? #include <iostream> using namespace std; struct sec { int a; char b; }; int main() { struct sec s ={25,50}; struct sec *ps =(struct sec *)&s; cout << ps->a << ps->b; return 0; }

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Structures And Unions In C Plus Plus).

Computer Subnetting
Academic Verified

Q7. What is the subnetwork number of a host with an IP address of 172.16.66.0/21?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Subnetting).

Computer Tally
Academic Verified

Q8. Which option from Company Info. menu is selected to create a new Company in Tally

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q9. Which option is used to make changes in created Groups of Ledgers in Tally

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q10. Which of the following is not compulsory to create while entry in Accounts with Inventory

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q11. In Tally, there are ________ predefined ledgers.

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q12. "Alias" represents

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q13. Which of the following is used for voucher entry

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q14. A trial balance is a ________

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q15. Integrated accounts with inventory is available in

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q16. The process of ascertaining the balance of a particular account on a given date is

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q17. Accounting principles are divided into two types. These are

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q18. For entries not involving either cash or bank transactions we use ________ voucher

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q19. Online voucher creation from Day Book report by pressing

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q20. Which Shortcut key is pressed to create a new company in Tally

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q21. Which shortcut key is pressed for voucher entry or deleting a ledger

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Tally).

Computer Tally
Academic Verified

Q22. Function key to select sales voucher is

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Tally).

Computer Tcp Ip
Academic Verified

Q23. Which class of IP address provides a maximum of only 254 host addresses per network ID?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Tcp Ip).

Computer Testing In Ruby (Rspec, Minitest, Etc.)
Academic Verified

Q24. What is the purpose of the before hook in RSpec?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Testing In Ruby (Rspec, Minitest, Etc.)).

Computer Testing In Ruby (Rspec, Minitest, Etc.)
Academic Verified

Q25. What is the purpose of a setup block in MiniTest?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Testing In Ruby (Rspec, Minitest, Etc.)).

Computer Testing In Ruby (Rspec, Minitest, Etc.)
Academic Verified

Q26. Which command is commonly used to run Cucumber tests from the command line?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Testing In Ruby (Rspec, Minitest, Etc.)).

Computer The Database Development Process
Academic Verified

Q27. Whose role is it to determine the requirements and design for a database?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (The Database Development Process).

Computer The Internet Database Environment
Academic Verified

Q28. Features of XML include which of the following?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (The Internet Database Environment).

Computer The Relational Model And Normalization
Academic Verified

Q29. A relation is in this form if it is in BCNF and has no multivalued dependencies:

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (The Relational Model And Normalization).

Computer Threads
Academic Verified

Q30. Which interface is used to create a thread in Java?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Threads).

Computer Threads
Academic Verified

Q31. In Java, what is a daemon thread?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Threads).

Computer Threads
Academic Verified

Q32. Analyze the following code: public abstract class Test implements Runnable{ public void doSomething() { }; }

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Threads).

Computer Threads
Academic Verified

Q33. What will be output of the following program code? public class Test implements Runnable{ public void run(){ System.out.print("go"); } public static void main(String arg[]) { Thread t = new Thread(new Test()); t.run(); t.run(); t.start(); } }

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Threads).

Computer Threads
Academic Verified

Q34. Which of these method is used to tell the calling thread to give up a monitor and go to sleep until some other thread enters the same monitor?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Threads).

Computer Threads
Academic Verified

Q35. What will be the output of the following Java program? class newthread extends Thread { Thread t; String name; newthread(String threadname) { name = threadname; t = new Thread(this,name); t.start(); } public void run() { } } class multithreaded_programing { public static void main(String args[]) { newthread obj1 = new newthread("one"); newthread obj2 = new newthread("two"); try { System.out.print(obj1.t.equals(obj2.t)); } catch(Exception e) { System.out.print("Main thread interrupted"); } } }

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Threads).

Computer Threads
Academic Verified

Q36. What should not be done to avoid deadlock?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Threads).

Computer Time Series Analysis
Academic Verified

Q37. What is the primary purpose of "lagging" in time series analysis?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Time Series Analysis).

Computer Time Series Analysis
Academic Verified

Q38. What is the primary goal of "cross-correlation analysis" in time series analysis?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Time Series Analysis).

Computer Time Series Analysis
Academic Verified

Q39. In time series analysis, what is the primary purpose of "Granger causality testing"?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Time Series Analysis).

Computer Time Series Analysis
Academic Verified

Q40. Which time series forecasting method involves combining several models' forecasts to improve prediction accuracy?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Time Series Analysis).

Computer Trees In Data Structures
Academic Verified

Q41. In a binary search tree (BST), which property is true about the nodes?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q42. What property distinguishes a binary tree from a general tree?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q43. In a binary tree, which type of node traversal will visit nodes in increasing order?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q44. Which node is the Leaf node in the following K-ary tree?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q45. Which node is the root node of the following K-ary tree?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q46. How many child nodes does each node of Ternary Tree contain?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q47. What is the time complexity for storing the maximum number of elements in Van Emde Boas tree if M is the maximum number of elements?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q48. ++a*bc*+defg is an?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Trees In Data Structures).

Computer Trees In Data Structures
Academic Verified

Q49. Which node is the Leaf node in the following ternary tree?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Trees In Data Structures).

Computer Tuples In Python
Academic Verified

Q50. In Python, how can you join two or more lists or tuples together?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Tuples In Python).

Computer Tuples In Python
Academic Verified

Q51. What will be the output of the following Python code? >>> import collections >>> a=collections.namedtuple('a',['i','j']) >>> obj=a(i=4,j=7) >>> obj

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Tuples In Python).

Computer Tuples In Python
Academic Verified

Q52. What will be the output of the following Python code? >>> a=(1,2,(4,5)) >>> b=(1,2,(3,4)) >>> a<b

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Tuples In Python).

Computer Variable Names And Operators
Academic Verified

Q53. Which is the correct operator for power(xy)?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Variable Names And Operators).

Computer Variable Names And Operators
Academic Verified

Q54. Which of the following cannot be a variable?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Variable Names And Operators).

Computer Variables And Constants In C Sharp
Academic Verified

Q55. What is the data type of the following variable declaration: var name = "John";

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Variables And Constants In C Sharp).

Computer Variables And Data Types In C Plus Plus
Academic Verified

Q56. What is the range of values for a 'short int' data type in C++?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Variables And Data Types In C Plus Plus).

Computer Variables And Data Types In C Plus Plus
Academic Verified

Q57. What is the data type of the expression: 5.2f in C++?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Variables And Data Types In C Plus Plus).

Computer Variables And Data Types In C Plus Plus
Academic Verified

Q58. What will be the output of the following C++ code? #include <iostream> using namespace std; void addprint() { static int s = 1; s++; cout << s; } int main() { addprint(); addprint(); addprint(); return 0; }

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Variables And Data Types In C Plus Plus).

Computer Variables And Data Types In C Plus Plus
Academic Verified

Q59. What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int a = 8; cout << "ANDing integer 'a' with 'true' :" << (a && true); return 0; }

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Variables And Data Types In C Plus Plus).

Computer Variables And Data Types In C Plus Plus
Academic Verified

Q60. What will be the output of the following C++ code? #include <iostream> using namespace std; enum colour { green, red, blue, white, yellow, pink }; int main() { cout << green<< red<< blue<< white<< yellow<< pink; return 0; }

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Variables And Data Types In C Plus Plus).

Computer Variables And Data Types In C Plus Plus
Academic Verified

Q61. Which of the following is a valid floating-point literal?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Variables And Data Types In C Plus Plus).

Computer Virtual Lans
Academic Verified

Q62. Which of the following modes are valid when a switch port is used as a VLAN trunk? 1. Blocking 2. Dynamic auto 3. Dynamic desirable 4. Nonegotiate 5. Access 6. Learning

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Virtual Lans).

Computer Web Scraping With Python
Academic Verified

Q63. What is the purpose of using XPath in web scraping?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Web Scraping With Python).

Computer Web Scraping With Python
Academic Verified

Q64. What is the purpose of using CSS selectors in web scraping?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Web Scraping With Python).

Computer Website Security
Academic Verified

Q65. What is the default value of max_execution_time directive? This directive specifies how many seconds a script can execute before being terminated.

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Website Security).

Computer Wide Area Networks
Academic Verified

Q66. In which of the following technologies is the term HFC used?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Wide Area Networks).

Computer Windows Forms Applications With C Sharp
Academic Verified

Q67. What is the purpose of the MenuStrip control in a Windows Forms Application?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Windows Forms Applications With C Sharp).

Computer Windows Forms Applications With C Sharp
Academic Verified

Q68. Which event is raised when the user presses a key while a control has focus in a Windows Forms Application?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Windows Forms Applications With C Sharp).

Computer Windows Forms Applications With C Sharp
Academic Verified

Q69. Which control is used to display a list of items in a scrollable window in a Windows Forms Application?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Windows Forms Applications With C Sharp).

Computer Windows Forms Applications With C Sharp
Academic Verified

Q70. What event is raised when the user presses and releases a mouse button on a control in a Windows Forms Application?

Show Explanation & Verified Solution
Correct Answer: Option C

Verified correct option for Computer (Windows Forms Applications With C Sharp).

Computer Wireless Technologies
Academic Verified

Q71. You are connecting your access point and it is set to root. What does Extended Service Set ID mean?

Show Explanation & Verified Solution
Correct Answer: Option A

Verified correct option for Computer (Wireless Technologies).

Computer Workflow Automation With Oozie
Academic Verified

Q72. In Oozie, what is the significance of the "precondition" element in a workflow action?

Show Explanation & Verified Solution
Correct Answer: Option D

Verified correct option for Computer (Workflow Automation With Oozie).

Computer Workflow Automation With Oozie
Academic Verified

Q73. In Oozie, what does the term "end" represent in a workflow action?

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Workflow Automation With Oozie).

Computer Workflow Automation With Oozie
Academic Verified

Q74. . . . . . . . . is a Java library for writing, testing, and running pipelines of MapReduce jobs on Apache Hadoop.

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Workflow Automation With Oozie).

Computer Workflow Automation With Oozie
Academic Verified

Q75. For enabling streaming data to . . . . . . . . chukwa collector writer class can be configured in chukwa-collector-conf.xml.

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Workflow Automation With Oozie).

Computer Workflow Automation With Oozie
Academic Verified

Q76. The items stored on . . . . . . . . are organized in a hierarchy of widget category.

Show Explanation & Verified Solution
Correct Answer: Option B

Verified correct option for Computer (Workflow Automation With Oozie).