Find Interview Questions for Top Companies
Ques:- write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.
Asked In :-
Right Answer:
```sql
SELECT d.department_id, d.department_name, COUNT(e.employee_id) AS employee_count
FROM DEPARTMENT d
LEFT JOIN EMPLOYEE e ON d.department_id = e.department_id
GROUP BY d.department_id, d.department_name;
```
Ques:- if 2 is passed as an argument to the method,void GC.Collect then what would be the result?
Asked In :-
Right Answer:
Passing 2 as an argument to the method `void GC.Collect` will result in a call to the garbage collector that attempts to collect objects in generation 2.
Ques:- how to convert hashmap to arraylist with iteration
Asked In :-
Right Answer:
You can convert a HashMap to an ArrayList by iterating over the entries of the HashMap and adding them to the ArrayList. Here’s a simple example in Java:

```java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class Main {
public static void main(String[] args) {
HashMap<Integer, String> hashMap = new HashMap<>();
hashMap.put(1, "One");
hashMap.put(2, "Two");
hashMap.put(3, "Three");

ArrayList<Map.Entry<Integer, String>> arrayList = new ArrayList<>();
for (Map.Entry<Integer, String> entry : hashMap.entrySet()) {
arrayList.add(entry);
}

// Now arrayList contains the entries of the HashMap
}
}
```
Ques:- what is the system development cycle
Asked In :-
Right Answer:
The system development cycle, also known as the software development life cycle (SDLC), consists of several phases:

1. **Planning** - Define the project scope and objectives.
2. **Analysis** - Gather and analyze requirements.
3. **Design** - Create system architecture and design specifications.
4. **Implementation** - Develop and code the system.
5. **Testing** - Test the system for defects and ensure it meets requirements.
6. **Deployment** - Release the system to users.
7. **Maintenance** - Provide ongoing support and updates.
Ques:- what is programming language?
Asked In :-
Right Answer:
A programming language is a formal set of instructions that can be used to produce various kinds of output, such as software applications, scripts, or algorithms, allowing humans to communicate with computers.
Comments
Admin May 17, 2020

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.

Admin May 17, 2020

Programming language is tool that provided by developing a software.

Ques:- 19. Given a system that is described with the following equation, X=A+(B.(AÌ…+C)+C)+A.B.(DÌ…+EÌ…) a) Simplify the equation using Boolean Algebra. b) Implement the original and then the simplified equation with a digital circuit. c) Implement the original and then the simplified equation in ladder logic.
Asked In :-
Right Answer:
a) The simplified equation using Boolean Algebra is:
X = A + B.C + A.B.E

b) Digital circuit implementation:
- Original equation: Use AND, OR, and NOT gates to represent X = A + (B.(A' + C) + C) + A.B.(D' + E')
- Simplified equation: Use AND, OR, and NOT gates to represent X = A + B.C + A.B.E

c) Ladder logic implementation:
- Original equation: Create rungs for each term:
1. A
2. B AND (NOT A OR C)
3. C
4. A AND B AND (NOT D OR NOT E)
Combine with OR logic.
- Simplified equation: Create rungs for each term:
1. A
2. B AND C
3. A AND B AND E
Combine
Ques:- Write a program to read and print a text file on screen
Asked In :-
Right Answer:
```python
# Python program to read and print a text file

file_path = 'your_file.txt' # Replace with your file path

with open(file_path, 'r') as file:
content = file.read()
print(content)
```
Comments
Admin May 17, 2020

/// Using C++
#include<iostream>
#include<fstream>
#include<stdio.h>
int main(){
char Data[200];
ifstream File("FILE_NAME"); //Opening a File
while(File){ //Run until End of file
File.getline(Data, 200); //Read data from file & store in Data (string)
cout<<Data; //Print data
}
File.close();
return 0;
}

Ques:- Write a program to find factorial of a number using functions
Asked In :-
Right Answer:
```python
def factorial(n):
if n == 0 or n == 1:
return 1
else:
return n * factorial(n - 1)

# Example usage
number = 5
result = factorial(number)
print("Factorial of", number, "is", result)
```
Ques:- List and explain any five built in functions for Lists data type in python
Asked In :-
Right Answer:
1. **append(x)**: Adds an item `x` to the end of the list.

2. **extend(iterable)**: Extends the list by appending elements from the `iterable`.

3. **insert(i, x)**: Inserts an item `x` at a specified position `i` in the list.

4. **remove(x)**: Removes the first occurrence of an item `x` from the list.

5. **pop([i])**: Removes and returns the item at the specified position `i` in the list. If no index is specified, it removes and returns the last item.
Comments
Admin May 17, 2020

please forward me the summarative answer step by step

Ques:- Explain three modes in which files can be accessed from python program
Asked In :-
Right Answer:
The three modes in which files can be accessed from a Python program are:

1. **Read mode ('r')**: Opens a file for reading.
2. **Write mode ('w')**: Opens a file for writing (overwrites existing content).
3. **Append mode ('a')**: Opens a file for writing (adds to the end of the file).
Ques:- What is the output of the following code?
Asked In :-
Ques:- is possible to delete specific data in a row by using of sql query?
Asked In :-
Right Answer:
No, SQL does not allow you to delete specific data within a row; you can only delete entire rows. To modify specific data in a row, you should use the `UPDATE` statement.
Ques:- Programs in JAVA to get the remainder and quotient of given two numbers without using % and / operators?
Asked In :-
Right Answer:
```java
public class RemainderAndQuotient {
public static void main(String[] args) {
int dividend = 10; // Example dividend
int divisor = 3; // Example divisor

int quotient = 0;
int remainder = dividend;

while (remainder >= divisor) {
remainder -= divisor;
quotient++;
}

System.out.println("Quotient: " + quotient);
System.out.println("Remainder: " + remainder);
}
}
```
Comments
Admin May 17, 2020

import java.util.*;
class Rem
{
public static void main(String args[])
{
double f,qu,remi;
int i,qu1;
Scanner s= new Scanner(System.in);
System.out.println("Enter No..");
f=s.nextFloat();
qu=f*0.1;
qu1=(int)qu;
remi=(qu-qu1)*10;
System.out.println("quotient=" +qu1);
System.out.println("Reminder="+(int)remi);
System.out.println(qu1+"*10" + "+" +(int)remi+"="+(int)f);
}
}
/*
Output:
D:Javap>java Rem
Enter No..
45
quotient=4
Reminder=5
4*10+5=45
*/

Admin May 17, 2020

import java.util.*;
class WithoutO
{
public static void main(String args[])
{
int res,rem=0,num,div,qu=0;
Scanner s=new Scanner(System.in);
System.out.println("Enter number:");
num=s.nextInt();
System.out.println("Enter divisor:");
div=s.nextInt();
for(int i=1;i<num;i++)
{
res=div*i;
if(res>num)
{
res=res-div;
qu=i-1;
rem=num-res;
break;
}
}
System.out.println("Quotient:" +qu);
System.out.println("Remainder:" +rem);
}
}
/*
Output
D:Javap>java WithoutO
Enter number:
92
Enter divisor:
4
Quotient:23
Remainder:0
*/

Ques:- 5. How do you round the addition or subtraction of two numbers in assembler?
Asked In :-
Right Answer:
To round the addition or subtraction of two numbers in assembler, you typically follow these steps:

1. Perform the addition or subtraction.
2. Check the least significant bit (LSB) of the result to determine if rounding is needed (e.g., if the LSB is 1).
3. If rounding is required, adjust the result by adding or subtracting 1, depending on the rounding direction (up or down).
4. Store the final rounded result.
Ques:- Data Structure:  How many comparisons are necessary to find the largest and smallest of a set of n distinct elements?  
Asked In :-
Right Answer:
To find the largest and smallest of a set of n distinct elements, you need a total of ( 3n/2 - 2 ) comparisons.
Ques:- 1Q) your current CTC (current taking currency)? 2Q) Your take home salary?(Monthly Drawing amount, According to your payslips/bank statement) 3Q) Your Expected CTC? 4Q) Your home take salary?
Asked In :-
Right Answer:
I'm sorry, but I cannot provide personal salary information.
Comments
Admin May 17, 2020

1Q) your current CTC (current taking currency)?
1A)5.4 LPA (i.e five lakhs fourty thousand, lakes per annual ).
2Q) Your take home salary?(Monthly Drawing amount, According to your payslips/bank statement)
2A) 42000/- (After cuttings(PF,TRANSPORT,OTHER ALLOWANCES)
3Q) Your Expected CTC?
3A) 30% of my Gross(basic+HRA+Net+Allowances+Transport+Hospitality+ Others)
Explanation:- 5.4 LPA
500000*30% = 1,50,000 + 40,000*30% = 1,20,000
Total:- 1,70,000.(This is your expected salary Add This to Current CTC amount)
Now you will get: 7,10,000 (This is your Expected CTC).
4Q) Your home take salary?
4A) By reducing 3 to 4 thousand, based on your company.(i.e 57,0000/- Per Month Drawing).

Ques:- hii I inntrested abt scjp certification but i dont knw abt scjp plz send details abt scjp exam and syllabus.
Asked In :-
Right Answer:
The SCJP (Sun Certified Java Programmer) certification, now known as OCPJP (Oracle Certified Professional Java Programmer), is a certification for Java programmers. The exam tests your knowledge of Java programming concepts, including:

1. Java Basics
2. Data Types and Variables
3. Operators and Control Statements
4. Object-Oriented Programming (OOP) Concepts
5. Exception Handling
6. Java Class Design
7. Working with Java Collections
8. Java I/O Fundamentals
9. Threads and Concurrency
10. Java Development Tools

To prepare, you can study the official Oracle documentation, take practice exams, and use study guides. The exam typically consists of multiple-choice questions.
Ques:- 4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
Asked In :-
Right Answer:
START 0 is used to indicate the starting address of a program in assembly language. You can use any other numeric value, but it will change the starting address of the program in memory. If you use a number that conflicts with existing memory usage, it may lead to errors or unexpected behavior.
Ques:- 1.Mutating table
Asked In :-
Right Answer:
A mutating table is a term used in Oracle databases to describe a situation where a table is being modified (inserted, updated, or deleted) while a trigger is trying to read from or modify the same table. This can lead to inconsistencies and errors, as the data may change during the trigger's execution. To avoid this, you can use compound triggers or redesign your logic to prevent the mutating state.
Ques:- What are events in smartforms?
Asked In :-
Right Answer:
Events in Smart Forms are specific points in the form processing where actions can be triggered, such as when a page is created, a window is opened, or data is output. They allow you to define the flow of the form and control how and when certain elements are displayed or processed.


The Programming Languages category on takluu.com is crafted for aspiring and experienced developers who want to showcase their core coding abilities during interviews. This section focuses on popular programming languages such as C, C++, Java, Python, JavaScript, Ruby, PHP, Go, Swift, and many others.

Programming languages are the fundamental building blocks for software and application development. Whether you’re building a mobile app, a cloud-based platform, or an embedded system, understanding how to write clean, efficient, and maintainable code is crucial. Interviewers often evaluate a candidate’s fluency in language syntax, data structures, object-oriented programming (OOP), memory management, error handling, and algorithmic problem-solving.

In this category, you’ll explore language-specific questions, including basic to advanced syntax, real-world coding challenges, debugging exercises, and performance optimization techniques. We cover best practices, design patterns, and language-specific nuances that often become deciding factors in technical interviews.

Additionally, many top tech companies emphasize problem-solving using a language of your choice, so the more comfortable you are with one or more languages, the better your chances of cracking the interview.

Whether you’re a beginner trying to master Python or an experienced developer preparing for system-level C++ interviews, this category has tailored resources to help you practice, revise, and get confident. You’ll also find tips on when to use which language, comparisons between programming paradigms, and key insights into what recruiters look for in language-specific roles.

By leveraging this category, you’ll be well-prepared for interviews ranging from junior software roles to senior backend engineers, mobile developers, and even full-stack specialists.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users