Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MCQ Questions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

MCQ :

FINANCE

1. What is the primary purpose of diversification in investment?


a) To increase risk
b) To decrease risk
c) To maximize returns
d) To concentrate investments in a single asset

2. Which of the following is a measure of a company's profitability?


a) EPS (Earnings Per Share)
b) P/E Ratio (Price/Earnings Ratio)
c) Dividend Yield
d) Book Value

3. What does the term "liquidity" refer to in finance?


a) A company's total assets
b) A company's cash flow
c) The ease of converting assets into cash
d) The level of debt a company holds

4. What is the purpose of a stock split?


a) To decrease the number of outstanding shares
b) To increase the price per share
c) To decrease the liquidity of the stock
d) To increase the number of outstanding shares

5. Which of the following is an example of a fixed-income security?


a) Stocks
b) Corporate Bonds
c) Mutual Funds
d) Commodities

6. What does the term "ROI" stand for in finance?


a) Return on Investment
b) Risk of Inflation
c) Rate of Interest
d) Revenue of Income

7. What does the "FED" stand for in the context of financial markets?
a) Federal Economic Department
b) Financial Evaluation Division
c) Federal Reserve System
d) Financial Enforcement Directorate

8. What is the main function of investment banks?


a) Lending money to individuals
b) Managing investment portfolios for clients
c) Underwriting securities offerings
d) Issuing credit cards

9. Which of the following is a measure of a company's efficiency in managing its inventory?


a) Gross Margin
b) Inventory Turnover Ratio
c) Return on Equity
d) Current Ratio

10. What is the purpose of a balance sheet?


a) To show a company's revenues and expenses over a period
b) To provide a snapshot of a company's financial position at a specific point in
time
c) To list a company's shareholders and their ownership percentages
d) To outline a company's dividend payout policy

DSA :
Certainly! Here are some hard-level multiple-choice questions based on data structures and
algorithms:

1. What is the time complexity of finding the kth smallest element in an unsorted array using
the QuickSelect algorithm in the average case?
a) O(n log n)
b) O(n)
c) O(n^2)
d) O(log n)

2. Which of the following data structures is typically used to implement a priority queue
efficiently?
a) Linked List
b) Stack
c) Heap
d) Hash Table

3. In the context of graph algorithms, what does Dijkstra's algorithm find?


a) Shortest path from a source node to all other nodes
b) Shortest path from a source node to a destination node
c) Minimum spanning tree of the graph
d) Maximum flow in a network

4. What is the worst-case time complexity of searching in a binary search tree (BST) if it's
unbalanced?
a) O(n)
b) O(log n)
c) O(n log n)
d) O(n^2)

5. Which sorting algorithm has the best average-case time complexity among the following?
a) Bubble Sort
b) Insertion Sort
c) Merge Sort
d) Quick Sort

6. What is the space complexity of Depth-First Search (DFS) algorithm when implemented
recursively on a graph with V vertices and E edges?
a) O(V)
b) O(E)
c) O(V + E)
d) O(log V)

7. Which of the following data structures provides constant-time access to the maximum (or
minimum) element?
a) Queue
b) Stack
c) Priority Queue
d) Linked List

8. What is the time complexity of Floyd-Warshall algorithm for finding all-pairs shortest paths
in a weighted graph with V vertices?
a) O(V log V)
b) O(V^2 log V)
c) O(V^3)
d) O(E log V)

9. Which data structure is typically used to implement Kruskal's algorithm for finding the
minimum spanning tree of a graph?
a) Heap
b) Stack
c) Priority Queue
d) Disjoint Set (Union-Find)

10. What is the time complexity of the Knuth-Morris-Pratt (KMP) algorithm for string
matching?
a) O(m + n)
b) O(m log n)
c) O(m * n)
d) O(m)

C / C++

Sure, here are some hard-level multiple-choice questions based on C and C++
programming:

1. What is the output of the following C code?

#include <stdio.h>
int main() {
int i = 5;
printf("%d", i++);
printf("%d", ++i);
return 0;
}
a) 56
b) 67
c) 65
d) 76

2. What is the purpose of the "volatile" keyword in C and C++?


a) It specifies that a variable's value cannot be changed once it is assigned
b) It specifies that a variable's value may be changed unexpectedly by external
factors
c) It specifies that a variable is to be stored in RAM instead of cache for faster access
d) It specifies that a variable's value will remain constant throughout the program's
execution

3. In C++, what is the difference between "new" and "malloc()" when allocating memory?
a) "new" returns a pointer to an array of contiguous memory, while "malloc()" returns a
pointer to a single block of memory
b) "new" automatically initializes the allocated memory, while "malloc()" does not
c) "new" throws an exception if memory allocation fails, while "malloc()" returns NULL
d) "new" is used for dynamic memory allocation in C++, while "malloc()" is used in
C

4. What is the output of the following C++ code?

```cpp
#include <iostream>
using namespace std;
class Base {
public:
virtual void display() { cout << "Base\n"; }
};
class Derived : public Base {
public:
void display() { cout << "Derived\n"; }
};
int main() {
Base *ptr = new Derived();
ptr->display();
delete ptr;
return 0;
}
```
a) Base
b) Derived
c) Compiler Error
d) Runtime Error

5. What is the purpose of the "const" keyword in C and C++?


a) It specifies that a variable cannot be modified
b) It specifies that a variable's value can only be modified within a function
c) It specifies that a variable can be modified by only one thread at a time
d) It specifies that a variable's value will be constant throughout the program's execution

6. Which of the following correctly defines a function pointer in C?


a) int (*ptr)(int, int) = &add;
b) int ptr(int, int) = &add;
c) int ptr(int, int) = add;
d) int (*ptr)(int, int) = add;

7. What is the output of the following C code?

```c
#include <stdio.h>
int main() {
char *ptr = "Hello";
printf("%c\n", *ptr++);
printf("%c\n", ++*ptr);
printf("%s\n", ptr);
return 0;
}
```
a) H
I
ello
b) H
I
llo
c) H
I
ello
d) Compiler Error

8. In C++, what is the difference between "delete" and "delete[]" when deallocating
dynamically allocated memory?
a) There is no difference; both are used interchangeably
b) "delete" is used to deallocate memory allocated using "new", while "delete[]" is
used to deallocate memory allocated using "new[]"
c) "delete" is used to deallocate memory allocated using "malloc()", while "delete[]" is used
to deallocate memory allocated using "calloc()"
d) "delete[]" is used to deallocate memory allocated using "malloc()", while "delete" is used
to deallocate memory allocated using "calloc()"
9. What does the "static" keyword mean when applied to a variable in C or C++?
a) It specifies that the variable's value cannot be modified
b) It specifies that the variable is allocated memory in the heap
c) It specifies that the variable is accessible only within the current file
d) It specifies that the variable retains its value between function calls

10. What is the purpose of the "inline" keyword in C++?


a) It specifies that a function's definition is provided separately in another file
b) It suggests the compiler to replace the function call with the function body
during compilation for performance optimization
c) It specifies that a function can be called from multiple threads simultaneously
d) It specifies that a function is to be executed inside another function without being called
explicitly

SQL
Certainly! Here are some hard-level multiple-choice questions based on SQL:

1. Which of the following SQL queries correctly retrieves the second highest salary from an
Employee table named "Employees"?

a) `SELECT MAX(Salary) FROM Employees WHERE Salary < (SELECT MAX(Salary)


FROM Employees);`

b) `SELECT TOP 1 Salary FROM (SELECT DISTINCT TOP 2 Salary FROM Employees
ORDER BY Salary DESC) AS SecondHighest ORDER BY Salary ASC;`

c) `SELECT Salary FROM Employees ORDER BY Salary DESC LIMIT 1 OFFSET 1;`

d) `SELECT Salary FROM Employees WHERE Salary = (SELECT MAX(Salary) FROM


Employees WHERE Salary < (SELECT MAX(Salary) FROM Employees));`

2. Consider two tables: "Employees" and "Departments". What is the correct SQL query to
retrieve the department name(s) along with the count of employees in each department,
including departments with zero employees?

a) `SELECT Departments.DepartmentName, COUNT(*) AS EmployeeCount FROM


Departments LEFT JOIN Employees ON Departments.DepartmentID =
Employees.DepartmentID GROUP BY Departments.DepartmentID;`

b) `SELECT Departments.DepartmentName, COUNT(Employees.EmployeeID) AS


EmployeeCount FROM Departments LEFT JOIN Employees ON
Departments.DepartmentID = Employees.DepartmentID GROUP BY
Departments.DepartmentID;`

c) `SELECT Departments.DepartmentName, COUNT(*) AS EmployeeCount FROM


Departments RIGHT JOIN Employees ON Departments.DepartmentID =
Employees.DepartmentID GROUP BY Departments.DepartmentID;`
d) `SELECT Departments.DepartmentName, COUNT(Employees.EmployeeID) AS
EmployeeCount FROM Departments RIGHT JOIN Employees ON
Departments.DepartmentID = Employees.DepartmentID GROUP BY
Departments.DepartmentID;`

3. Which SQL keyword is used to remove duplicates from the result of a SELECT query?

a) UNIQUE

b) DISTINCT

c) DIFFERENCE

d) DISTINCTROW

4. Given the following tables:

Employees:
| EmployeeID | EmployeeName | DepartmentID |
|------------|--------------|--------------|
|1 | Alice | 101 |
|2 | Bob | 102 |
|3 | Charlie | 101 |

Departments:
| DepartmentID | DepartmentName |
|--------------|----------------|
| 101 | HR |
| 102 | IT |

What will be the result of the SQL query: `SELECT EmployeeName FROM Employees
WHERE DepartmentID = 101 UNION SELECT DepartmentName FROM Departments
WHERE DepartmentID = 101;`?

a) Alice, HR

b) HR, Alice

c) Alice, Bob, Charlie, HR

d) Alice, HR, HR
5. Which SQL query would you use to find the third highest salary from an "Employees"
table?

a) `SELECT TOP 1 Salary FROM (SELECT DISTINCT TOP 3 Salary FROM Employees
ORDER BY Salary DESC) AS ThirdHighest ORDER BY Salary ASC;`

b) `SELECT Salary FROM Employees ORDER BY Salary DESC LIMIT 1 OFFSET 2;`

c) `SELECT MAX(Salary) FROM Employees WHERE Salary < (SELECT MAX(Salary)


FROM Employees WHERE Salary < (SELECT MAX(Salary) FROM Employees));`

d) `SELECT MAX(Salary) FROM Employees WHERE Salary NOT IN (SELECT


MAX(Salary) FROM Employees UNION SELECT MIN(Salary) FROM Employees);`

You might also like