VARSUN eTechnologies
10+ Interview Questions and Answers
Q1. write a program on prime number and write query in SQL.
Program to check prime numbers and SQL query for prime numbers.
Use a loop to check if a number is divisible by any number less than itself.
In SQL, use a subquery to check if a number is divisible by any number less than itself.
To optimize, only check divisibility up to the square root of the number.
Q2. write query to get full name of a employees from employee table.
Query to retrieve full name of employees from employee table.
Use SELECT statement to retrieve data from employee table.
Concatenate first name and last name columns using CONCAT function.
Use AS keyword to give an alias name to the concatenated column.
Q3. what is access modifires in python?
Access modifiers in Python are keywords used to restrict access to class members.
Python has three access modifiers: public, protected, and private.
Public members can be accessed from anywhere outside the class.
Protected members can be accessed within the class and its subclasses.
Private members can only be accessed within the class.
Public members are denoted by no underscore, protected members by a single underscore, and private members by double underscore.
Example: class MyC...read more
Q4. write a program a number is prime number or not?
Program to check if a number is prime or not
A prime number is only divisible by 1 and itself
Loop through numbers from 2 to n-1 and check if n is divisible by any of them
If n is divisible by any number, it is not prime
If n is not divisible by any number, it is prime
Q5. write a program for christmas tree with 8 and 4 stars?
Program to print Christmas tree with 8 and 4 stars
Use loops to print the tree structure
For 8 stars tree, use 4 rows and for 4 stars tree, use 3 rows
Print spaces before and after the stars to align them properly
Q6. write program swapping of a two numbers?
Program to swap two numbers
Declare two variables and assign values to them
Use a third variable to store the value of the first variable
Assign the value of the second variable to the first variable
Assign the value of the third variable to the second variable
Q7. what is class and object?
Class is a blueprint for creating objects. Objects are instances of a class that have their own unique properties and behaviors.
A class is a template or blueprint for creating objects
An object is an instance of a class with its own unique properties and behaviors
Classes define the properties and methods that objects of that class will have
Objects can interact with each other through their methods and properties
Example: A class 'Car' can have properties like 'color', 'model', ...read more
Q8. write a program on prime number or not
A program to check if a given number is prime or not.
Take input from user
Check if the number is less than 2, then it is not a prime number
Loop through numbers from 2 to n-1 and check if n is divisible by any of them
If n is divisible by any number, then it is not a prime number
If n is not divisible by any number, then it is a prime number
Q9. write a program on save the prisoner?
Save the prisoner program in Java
Take input for number of prisoners, number of sweets and starting prisoner
Calculate the index of the last prisoner to receive a sweet using modulo operator
Handle edge cases where the last prisoner is the starting prisoner
Implement the program using loops and conditional statements
Q10. what is SQL,write a query?
SQL is a programming language used to manage and manipulate relational databases.
SQL stands for Structured Query Language.
It is used to create, modify, and query databases.
Example query: SELECT * FROM customers WHERE city='New York';
Q11. What is python?
Python is a high-level, interpreted programming language known for its simplicity, readability, and versatility.
Python is used for web development, data analysis, artificial intelligence, scientific computing, and more.
It has a large standard library and supports multiple programming paradigms.
Python code is often shorter and easier to read than other languages.
It uses indentation to indicate code blocks instead of curly braces or keywords.
Python is open-source and has a stro...read more
Q12. what is javascript?
JavaScript is a programming language used to create interactive web pages and web applications.
JavaScript is a client-side scripting language
It is used to add interactivity to web pages
It can be used for form validation, creating animations, and more
JavaScript can also be used on the server-side with Node.js
Q13. what is database?
A database is a structured collection of data that can be accessed, managed, and updated.
A database is used to store and organize data in a structured way
It allows for efficient retrieval and manipulation of data
Examples include MySQL, Oracle, and MongoDB
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month