Interview
Interview
SELF INTRODUCTION:
Good morning, sir/madam. First of all, thank you for giving this opportunity to introduce myself. My
name is Bathula Raghunath Reddy. I am from Guntur in AP. I am pursuing my bachelor's degree in
Kalasalingam Academy of Research and Education in the stream of CSE department by holding 7.43
CGPA. Now coming to my schooling, I have done my 12th class in Sri Chaitanya Junior college in
Vijayawada, AP from state board with 85.9% and 10th class in Dr. KKR Gowtham High school in Guntur,
AP from state board with 8.3GPA.
Now coming to my family background, we are 4 members. My Father and Mother are farmers, and
my elder brother was doing job in Byju’s company in the role of content writer work for 6 months.
Apart from my education, I am always interested to know new things I am a fresher and I have no
experience I have to improve my skills and knowledge. I will assure that I will show my skills and
knowledge in my work with 100%.
My strengths are I am self-motivated person, hardworking and disciplined person. I have actively
participated in workshops and webinars which are conducted by educational institutions and
organisations which help me to understand things in depth. My soul in life is to get placed in reputed
company like yours and learn new set of skills to gain professional experience.
(OR)
Good morning, sir/madam. First of all, thank you for giving this opportunity to introduce myself. My
name is Bathula Raghunath Reddy. I am from Guntur in AP. I am pursuing my bachelor's degree in
Kalasalingam Academy of Research and Education in the stream of CSE department by holding 7.43
CGPA. Now coming to my schooling, I have done my 12th class in Sri Chaitanya Junior college in
Vijayawada, AP from state board with 85.9% and 10th class in Dr. KKR Gowtham High school in Guntur,
AP from state board with 8.3GPA.
I am always interested to know new things I am a fresher and I have no experience I have to improve
my skills and knowledge. I will assure that I will show my skills and knowledge in my work with 100%.
My strengths are I am self- motivated, positive thinking, confident person and able to learn in a quick
manner. My hobbies are Playing and watching cricket, listening to music and browsing the internet. .
My soul in life is to get placed in reputed company like yours and learn new set of skills to gain
professional experience.
ABOUT PROJECT:
2)To develop a voice primarily based email system that will facilitate visually impaired individuals to
access email in a problem free manner.
3)This application provides a voice primarily based mailing service which provides them to browse
and send mail on their own without any guidance.
Technologies used:
Machine learning: Machine learning is an application of artificial intelligence (AI) that provides
systems the ability to automatically learn and improve from experience without being explicitly
programmed.
HTML: The Hypertext Markup Language (HTML) is the standard markup language for documents
designed to be displayed in a web browser.
CSS: CSS full form is “Cascading Style Sheets”. CSS is a computer language for laying out and
structuring web pages.
Software Used:
1)Linux Ubuntu
2)Python
3)Open CV
Linux Ubuntu: Ubuntu is a Linux distribution based on Debian and composed mostly of free and
open-source software.
Python: Python is a computer programming language often used to build websites and software,
automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be
used to create a variety of different programs.
Open CV: Open CV is a library of programming functions mainly aimed at real-time computer vision.
1) How speech is converted into Voice? / How do blind people read a text or message?/ Can blind
people read Emails?
Ans: A braille display is a flat keyboard like device that translates text into braille and enables blind
individuals to read text using their fingers.
Ans: Speaking Email is fully accessible with voice over, the screen reader that blind people use to
interact with their i-phone.
Ans: Blind people use many different ways to communicate. They use sign language (Adapted to fit
their visual field), tracking, print on palm, Braille, speech and speech reading.
Ans: Braille is a system that uses combinations of raised dots to spell letters and numbers. It is used
by people who are partially sighted to help them read and write. Braille is not actually a language-
it’s a system writing.
Ans: People who are fluent in Braille can typically read at a rate of 125 to 200 words per minute.
Ans: Braille is a system that uses combinations of raised dots to spell letters and numbers. Its used
by people who are blind to help them read and write.
Ans: All braille is written as a combination of 6 dots per cell. The dots are arranged in 2 vertical rows.
A single letter may be as few as 1 dot or many as 5 dots.
For example, the first 10 letters of the alphabet use the top 4 dots, while the next 10 letters
add the bottom left -hand dot to the previous 10 letters.
Advantages: 1) It is Effective.
2) It is low cost.
2)The systems are web and desktop applications they cannot be used by blind
people without some help.
OOPS CONCEPTS:
**Main features of OOPS**:
1)Abstraction
2)Encapsulation.
3)Polymorphism.
4)Inheritance
1)Object: It is a real -world entity which is having the property and tasks performed.
Ex: A dog is an object because it has state like colour, name etc.
Ex: When we are driving a car, we are only concerned about driving the car like start/stop the car,
accelerate/break etc.
1)Data Abstraction: The act of representing essential features without including the background
details. Ex: Switch board.
2)Process Abstraction.
2)School bag: School bag can keep our books, pens etc.
*The class whose properties and methods are inherited known as Parent class and the class that
inherits the properties from parent class is called child class.
3)Multi level Inheritance: Class 1 is inherited class 2 and this class 2 also get inherited by class 3 and
this process goes on.
4)Hybrid Inheritance: When there is a combination of more than one form of Inheritance.
5)Hierarchical Inheritance: When more than one class is inherited from a single parent class.
The function is invoked at compile time and it executes faster than runtime polymorphism at the
compile time.
The function is invoked at run time and it executes slower than compile time polymorphism at the
run time.
1)Method overloading: If a class has multiple methods having same name but different in
parameters
2)Method Overriding: If subclass (Child class) has the same method as declared in the parent class.
* Usage: Provide the specific implementation of a method which is already provided by its
superclass.
Abstraction is the method of hiding the unwanted information. Whereas encapsulation is a method
to hide the data in a single entity or unit along with a method to protect information from outside.
Example: Outer Look of i-phone, like it has a display screen. Encapsulation is inner layout in terms of
implementation.
2) Constructor: The name of the constructor is the same as the name of the object but it has no
return type.
5) Array: It is a collection of similar type of data items stored at contiguous memory locations.
While loop: Used to repeat a specific block of code an unknown number of times, until a condition is
met.
8)Static memory allocation: which allocates a fixed amount of memory during compile time
9) Dynamic memory allocation: Memory is allocated at runtime and memory can be increased while
executing the program.
10)Data structures: It is a collection of data values, the relationships among them, and the functions
or operations that can be applied to the data.
11) DBMS: software designed to store, retrieve, define, and manage data in a database.
3)For the development of code, C supports procedural programming and C++ supports procedural &
Object-oriented programming.
4)C does no support polymorphism, encapsulation, and inheritance which means that C does not
support Object oriented programming and C++ supports polymorphism, encapsulation, and
inheritance because it is an Object-oriented programming language.
Python is a high-level language as the translation of Python code takes place into machine language,
using an interpreter. C is a compiled programming language. C is a faster language compared to
Python as it is compiled. Python programs are usually slower than C programs as they are
interpreted.
Java is a statically typed and compiled language, and Python is a dynamically typed and interpreted
language.
16) Stack: A stack is a linear data structure that follows the LIFO (Last in First Out) principle. It
contains only one pointer top pointer pointing to the topmost element of the stack.
Ex: “Stack of plates”: we can only take a plate from the top of the stack, and you can only add a
plate to the top of the stack.
1)Simple queue: It is the most basic queue. The enqueue operation takes place at the rear, while
dequeue operation takes place at the front.
2)Circular queue (Ring Buffer): A circular queue is similar to linear queue as it is based on the FIFO
principle except that the last position is connected to the first position in a circular queue that forms
a circle.
3)Priority queue: A priority queue is a special type of queue in which each element is associated with
a priority and is served according to its priority.
4)Double ended queue: Double ended queue is a generalised version of queue data structure that
allows insert and delete at both ends.
18) RDBMS (Relational Database Management System): The software used to store, manage, query
and retrieve data stored in a relational database is called RDBMS.
19) Tables: Tables are database objects that can contain all the data in a database. It consists of
columns and rows.
20) Attributes: Entities are represented by means of their properties called attributes.
Ex: A student entity may have name, class and age as attributes.
1)DBMS stores data as a file whereas in RDBMS data is stored in the form of tables.
3)DBMS does not support client server architecture but RDBMS supports client server architecture.
1)Redundancy control.
4) Easy accessibility.
23)Database system: The collection of database and DBMS software together is called Database.
24) Entity: An entity is a set of attributes in database. An entity can be a real-world object which
physically exists in this world.
PUSH: PUSH specifies that data is being inserted into the stack.
POP: POP specifies data retrieval. It means that data is being deleted from the stack.
27) Postfix Expression: An expression in which operators follow the operands is called postfix
expression.
28) Prefix Expression: It requires that all operators precede the two operands that they work on.
29) Linear search (or) sequential search: It is a method of finding an element within a list.
30) Binary search: It is used to find the position of an element in a sorted array.
31) Bubble sort: It is an algorithm that compares two adjacent elements and swaps them until they
are not in the ascending order. Worst complexity: 0(n2) Average complexity: 0(n2)
32) Insertion sort: It is a sorting algorithm in which the elements are transferred one at a time to the
right position. Worst complexity: n2 Average complexity: n2
33) Selection sort: It is a sorting algorithm that selects the smallest element from an unsorted list in
each iteration and places that element at the beginning of the unsorted list.
34) RAM (Random Access Memory): RAM is a form of computer memory that can read and changed
in any order, typically used to store working data and machine code.
35)ROM (Read Only Memory): ROM is a type of non -volatile memory used in computers and other
electronic device.
36) 1NF (Normal Form): It states that an attribute of a table cannot hold multiple values. It must hold
only single valued attribute.
37) 2NF: It is based on the concept of full functionality dependency. It applies to relations with
composite keys (i.e relations with primary key composed of 2 or more attributes)
38) 3NF: It is a database schema design approach for relational databases which uses normalizing
principles to reduce the duplication of data.
39) Operating System: It is a software programme required to manage and operate a computing
device like smartphones, computers, web servers, network towers, smartwatches etc.
41) Structured programming: It is a programming paradigm that involves a totally structured control
flow.
42) Checkpoint: It is a technique that removes all previous logs from the system and stores them
permanently on the storage drive.
:
1) FEATURES OF C LANG:
Fast - Support for system programming allows faster compilation and execution compared
to popular high-level languages like Java and Python.
Memory Management - Comes with built-in memory management for saving memory and
optimizing memory use.
Platform independence/Portability - A C program written for one machine can run on other
machines with little to no modifications.
Simplicity - Follows the structured approach. Facilitates breaking down a big, complex
program into smaller, independent, and easy-to-manage modules (sub-programs).
Ans: The C language is one of the most used computer programming languages. The
language is used by giving step by step instructions, which makes it a procedural language.
3) Who invented the C language and when?
Ans: Dennis M. Ritchie in 1971.
4) What is header file and what will happen if we include a header file twice in a C program?
Ans: Header files store the definitions and set of rules governing different built-in functions of
the C programming language. For instance, the printf () and scanf () functions are defined in
the stdio.h header file.
For example, you can’t use printf () and scanf () functions without including the stdio.h
header file.
When a header file is included twice in a C program, the second one gets ignored.
Case Sensitive Language: It is a case sensitive language due to which the lower and the
upper-case letters are treated differently.
Portable Language: C language is a highly flexible language that enables it to be used for
scripting system applications, which makes it a part of many well-known operating systems.
Powerful and Efficient Language: It is a user-friendly language and can effectively operate
on games, graphics, enterprise applications, applications that need some calculations, etc.
7)Limitations of C language?
Ans: 1) Concept of OOPs: C language prohibits the concept of OOPs as it is based on the
procedural approach. (Inheritance, Polymorphism, Encapsulation, Abstraction, Data Hiding).
2)Run Time Checking: C language does not do the running checking which means that
errors are not detected after every line of coding, but only once the complete coding is done
making it inconvenient to correct the bugs.
3)Concept of the Namespace: C language does not exhibit the property of Namespace, so
there cannot be two variables with the same name in the C language program.
4)Lack of Exception Handling: The language doesn’t exhibit the important feature of
exception handling. The feature of exception handling doesn’t allow the user to detect the
errors and bugs while compiling the code .
5) Insufficient Level for Abstraction: C language doesn’t have a very wide data handling
capacity, which poses a threat to the security of the language .
Ans: The main () function in C language to the inlet to the C program. It is the entry point
where the process of execution of the program starts. When the execution of the C program
initiates, the control of the program is directed towards the main () function.
Ans: Words that are restricted for general use while writing a program, i.e., for using as a
name for a variable, function, structure, etc. are called reserved keywords
*There are 32 reserved keywords are there namely break, case, char, cons, default, do etc.
11) Nested loop: When the one loop gets into the other loop and starts running that loop is
called nested loop. The outer loop will specify the number of times the inner loop will perform
its function and every time the first loop performs its tasks.
12) Syntax error: The mistakes that occur in the programming language is called syntax
error.
13) One Dimensional array: One-dimensional array is an array that stores the elements one
after the another
14) Pointer on a pointer: It’s a pointer variable which can hold the address of another pointer
variable. It de-refers twice to point to the data held by the designated pointer variable.
1) Winding phase: When the recursive function calls itself, and this phase ends when the
condition is reached.
2) Unwinding phase: Unwinding phase starts when the condition is reached, and the control
returns to the original call.
Ans: 1) Accessing array elements: Pointers are used in traversing through an array of integers
and strings.
2) Dynamic memory allocation: Pointers are used in allocation and deallocation of memory
during the execution of a program.
3) Call by Reference: The pointers are used to pass a reference of a variable to other function.
27) Static Memory Allocation: In case of static memory allocation, memory is allocated at
compile time, and memory can't be increased while executing the program. It is used in the
array. Ex: int a [10];
* The above example creates an array of integer type, and the size of an array is fixed, i.e., 10.
28) Dynamic Memory Allocation: In case of dynamic memory allocation, memory is
allocated at runtime and memory can be increased while executing the program. It is used in
the linked list. Ex: int *p= malloc (size of(int)*10);
Keywords: Keywords are the predefined words that are explained by the compiler.
Constants: Constants are the fixed values that cannot be changed during the execution of a
program.
Special characters: All the characters except alphabets and digits are treated as special
characters.
Ans: print (): The print () function is used to print the integer, character, float, and string values
on to the screen.
Scanf (): The scanf () function is used to take input from the user
C++ INTERVIEW QUESTIONS:
Ans: 1) Primitive Datatype (basic datatype). Example- char, short, int, float, long, double,
bool, etc.
Ans:
STRUCTURE CLASS
4) Virtual Function: It is a member function in the base class that you redefine in a derived
class. A virtual function is declared using the virtual keyword.
5) Friend class: A friend class can access private, protected, and public members of other
classes in which it is declared as friends.
6) Friend Function: A friend function can also access private, protected, and public
members. But friend functions are not member functions.
Characteristics:
1) The friend function is not in the scope of the class in which it has been declared.
Ans: 1) Public: All data members and member functions are accessible outside the class.
2)Protected: All data members and member functions are accessible inside the class and to
the derived class.
3)Private: All data members and member functions are not accessible outside the class.
8) Inline function: If a function is inline, the compiler places a copy of the code of that
function at each point where the function is called at compile time.
10) Copy Constructor: A copy constructor is a member function that initializes an object
using another object of the same class.
11) Virtual Function: A virtual function is a member function in the base class that you
redefine in a derived class. It is declared using the virtual keyword.
}
};
12) Pure Virtual Functions: A pure virtual function is a function that has no implementation
and is declared by assigning 0. It has no body.
Here, = sign has got nothing to do with the assignment, and value 0 is not assigned to
anything. It is used to simply tell the compiler that a function will be pure.
13) Void Pointers: A void pointer is a pointer which is having no datatype associated with it.
It can hold addresses of any type.
For Example:
void *ptr;
char *str;
p=str; // no error
str=p; // error because of type mismatch
14) Difference between Array and List.
2) Array memory allocation is static and continuous while List memory allocation is
dynamic and random.
15) Pre-increment pointer: The pre-increment operator increments the operand by 1, and
the value of the expression becomes the resulting value of the incremented. Suppose ptr is a
pointer then pre-increment pointer is represented as ++ptr.
Example:
#include <iostream>
int main()
int a[5]={1,2,3,4,5};
int *ptr;
ptr=&a[0];
return 0;
16) Post-increment pointer: The post-increment operator increments the operand by 1, but the value
of the expression will be the value of the operand prior to the incremented value of the operand.
Suppose ptr is a pointer then post-increment pointer is represented as ptr++ 2
Example:
#include <iostream>
int main()
int a[5]={1,2,3,4,5};
int *ptr;
ptr=&a[0];
cout<<"Value of *ptr is : "<<*ptr<<"\n";
return 0;
19) Token in C++: A token in C++ can be a keyword, identifier, literal, constant and symbol.
20) Name space: The namespace defines the scope where the identifiers such as variables,
class, functions are declared.
Syntax:
namespace namespace_name
{
//body of namespace;
}
Ans: 1) C++ is a highly portable language means that the software developed using C++
language can run on any platform.
23) Inline functions: It is for which the compiler copies the code from the function definition
directly into the code of the calling function rather than creating a separate set of instructions
in memory.
JAVA INTERVIEW QUESTIONS:
Ans: Java language was developed in such a way that it does not depend on any hardware
or software because the compiler compiles the code and then converts it to platform-
independent byte code which can be run on multiple systems.
Ans: Java supports primitive data types - byte, Boolean, char, short, int, float, long, and
double and hence it is not a pure object-oriented language.
3) Final variable: When a variable is declared as final in Java, the value can’t be modified
once it has been assigned.
4) Final method: A method declared as final cannot be overridden by its children's classes
5) Final Class: No classes can be inherited from the class declared as final. But that final
class can extend other classes for its usage .
Ans: The super keyword is used to access hidden fields and overridden methods or
attributes of the parent class.
Ans: The main objective of this process is to free up the memory space occupied by the
unnecessary and unreachable objects during the Java program execution by deleting those
unreachable objects.
8) JDK (Java Development Kit): JDK is a complete software development kit for developing
Java applications. It comprises JRE, Javadoc, compiler, debuggers, etc.
9) JRE (Java Runtime Environment): JRE is a software package providing Java class
libraries, JVM and all the required components to run the Java applications.
11) Thread Local: Thread Local in Java is used for creating thread-local variables. We
know that all threads of an object share its variables.
Ans: The synchronized block is more preferred because it doesn’t lock the object,
synchronized methods lock the object and if there are multiple synchronization blocks in the
class, even though they are not related, it will stop the execution and put them in a wait state
to get the lock on the object.
13) Thread Priority: Every thread when gets born is assigned with a priority value and usually
higher priority gets precedence in execution but it also depends on the Thread Scheduler
implementation which is OS dependent.
15) System Class in JAVA: System class is one of the core classes. One of the easiest ways
to log information for debugging is System.out.print() method. System class is final so we can’t
subclass and override its behaviour through inheritance.
16) Aggregation in JAVA: Aggregation is best defined as the entity reference where it
represents the relationship between two classes where the aggregate class contains a
reference to the class which it owns.
Ans: In a while or do-while loop, we use break for a statement to terminate the loop. We use
a break statement in a switch statement to exit the switch case. We can also use break
statement for terminating the nested loop.
*The continue statement is used for skipping the current iteration of a for, while or do-while
loop.
18) Type Casting: When we assign a value of one data type to a different data type then these
two data types might not be compatible with each other and needs conversion.
21) Garbage Collection: It is the process by which java programs perform automatic memory
management.
22) Class loader: The class loader loads the java programme first whenever we execute it.
Ans: Local variables, primitives, and object references are not initialised to any default value
in Java.
1) Network: A network is a collection of devices connected to each other to allow the sharing
of data. Ex: Internet.
2) Network Topology: Network topology specifies the layout of a computer network. It shows
how devices and cables are connected to each other.
3) Network Reliability: Network reliability means the ability of the network to carry out the
desired operation through a network such as communication through a network.
4) Types of Networks:
o PAN (Personal Area Network): Its range limit is up to 10 meters. It is created for
personal use. Generally, personal devices are connected to this network. For example
computers, telephones, fax, printers, etc.
o LAN (Local Area Network): It is used for a small geographical location like office,
hospital, school, etc.
o HAN (House Area Network): It is actually a LAN that is used within a house and used
to connect homely devices like personal computers, phones, printers, etc.
o CAN (Campus Area Network): It is a connection of devices within a campus area
which links to other departments of the organization within the same campus.
o MAN (Metropolitan Area Network): It is used to connect the devices which span to
large cities like metropolitan cities over a wide geographical area.
o WAN (Wide Area Network): It is used over a wide geographical location that may
range to connect cities and countries.
o GAN (Global Area Network): It uses satellites to connect devices over global are.
5) MAC Address: MAC stands for Media Access Control. It is the address of the device at the
Media Access Control Layer of Network Architecture.
7) Protocol: A protocol is a set of rules which is used to govern all the aspects of information
communication.
8) Private IP address: There are three ranges of IP addresses that have been reserved for IP
addresses. They are not valid for use on the internet. If we want to access internet on these
private IPs, we must have to use proxy server.
9) Public IP address: A public IP address is an address taken by the Internet Service Provider
which facilitates you to communication on the internet.
1)PHYSICAL LAYER: Physical layer transmits the data either in the form of electrical/optical or
mechanical form. The physical layer is mainly used for the physical connection between the
devices.
2) DATALINK LAYER: It is used for transferring the data from one node to another node. It
receives the data from the network layer and converts the data into data frames and then
attach the physical address to these frames which are sent to the physical layer.
3)NETWORK LAYER: Network layer converts the logical address into the physical address. It
provides the routing concept means it determines the best route for the packet to travel from
source to the destination.
4)TRANSPORT LAYER: It delivers the message through the network and provides error
checking so that no error occurs during the transfer of data.
5)SESSION LAYER: The main responsibility of the session layer is beginning, maintaining, and
ending the communication between the devices.
7)APPLICATION LAYER: Application layer enables the user to access the network. It is the
topmost layer of the OSI reference model.
11) TCP/IP: TCP/IP is short for Transmission Control Protocol /Internet protocol. It is a set of
protocol layers that is designed for exchanging data on different types of networks.
1. Application Layer
2. Transport Layer
3. Internet Layer
4. Network Layer
13) Router: A router is a networking device that forwards data packets between computer
networks.
15) Working of Router: The process of determining the path for data to follow in order to
navigate from one server to another.
16) Switch: Switches allow devices to share and transfer data, enabling communication
between devices on the network.
18) Uses of IP Address: It is used to connect the internet and identify devices so that
computers like desktops, mobile devices and servers can communicate each other.
19) Functions of IP Address: It is to handle the connection between devices that send and
receive information across a network.
20) Ipv4 Address: It is a 32bit number that uniquely identifies a network interface on a
machine.
21) IPv6 Address: It is a 128bits in length and consists of eight 16bit fields, with each field
bounded by a colon. Each field must contain Hexadecimal number
PYTHON INTERVIEW QUESTIONS:
Ans: Python was created by Guido van Rossum and released in 1991.
4) Why Python?
Ans: 1) Python allows to implement the Object-Oriented concepts to build application solution
Python is an interpreted, object-oriented, high-level programming language with dynamic
semantics.
2)Python is compatible with different platforms like Windows, Mac, Linux, Raspberry Pi, etc.
4)Python allows a developer to write programs with fewer lines than some other programming
languages.
5) Applications of Python:
6) Advantages of Python:
Interpreted: It does not require prior compilation of code and executes instructions directly.
3)It is Extensible.
4) Object-oriented
7) Python Functions: A function is a section of the program or a block of code that is written
once and can be executed whenever required in the program.
o Built-In Functions: copy (), len (), count () are the some built-in functions.
o User-defined Functions: Functions which are defined by a user known as user-defined
functions.
o Anonymous functions: These functions are also known as lambda functions because
they are not declared with the standard def keyword.
Ans: The join () is defined as a string method which returns a string value.
Ans: The break statement is used to terminate the execution of the current loop.
10) Tuple in Python: A tuple is a built-in data collection type. It allows us to store values in a
sequence. It is immutable, so no change is reflected in the original data. It uses () brackets
rather than [] square brackets to create a tuple.
Ans: 1) Arithmetic Operators: It perform basic arithmetic operations. For example, "+" is
used to add and "?" is used for subtraction.
5)Identity Operators: It is used to check two values or variable which are located on the
same part of the memory.
6)Bitwise Operators: It is used to performing operations over the bits. The binary operators
(&, |, OR) work on bits.
7)Relational Operators: It is used to comparing the values. These operators test the
conditions and then returns a Boolean value either True or False.
Ans: Python is an interpreted language. The Python language program runs directly from the
source code. It converts the source code into an intermediate language code, which is again
translated into machine language that must be executed.
13) Global variable: Variables declared outside a function or in global space are called global
variables.
14) Local Variable: Variables declared inside a function is called Local variable. This variable is
present in the local space and not in the global space.
15) Dictionary in Python: The Python dictionary is a built-in data type. It defines a one-to-one
relationship between keys and values. Dictionaries contain a pair of keys and their
corresponding values. It stores elements in key and value pairs.
16) Pass in Python: Pass specifies a Python statement without operations. It is a placeholder in
a compound statement. If we want to create an empty class or functions, the pass keyword
helps to pass the control without error.
Example:
class Student:
pass # Passing class
class Student:
def info():
pass # Passing function
17) Which programming language is a good choice between Java and Python?
Ans: Python 2.x is an older version of Python. Python 3.x is newer and latest version. Python
2.x is legacy now. Python 3.x is the present and future of this language.
Ans: In Python, some amount of coding is done at compile time, but most of the checking
such as type, name, etc. are postponed until code execution. The Python code will fail only
with an exception when the code execution path does not exist.
20) enumerate () function: It is used to iterate through the sequence and retrieve the index
position and its corresponding value at the same time.
list() - This function is used to convert any data type to a list type.
dict() - This function is used to convert a tuple of order (key, value) into a dictionary.str()
- Used to convert integer into a string.
Complex (real, image) - This function converts real numbers to complex (real, image)
number.
1) What is SQL?
Ans: SQL stands for the Structured Query Language. It is the standard language used to
maintain the relational database and perform many different data manipulation operations on
the data.
2) Uses of SQL:
3) Subsets of SQL:
1)Data definition language (DDL): It defines the data structure that consists of
commands like CREATE, ALTER, DROP, etc.
* Purpose of DDL: DDL stands for Data definition language. It is the subset of a database
that defines the data structure of the database when the database is created. For example, we
can use the DDL commands to add, remove, or modify tables
* Purpose of DML: It makes the user able to retrieve and manipulate data in a relational
database. The DML commands can only perform read-only operations on data.
3)Data control language (DCL): It controls access to the data stored in the database. The
commands in this category include GRANT and REVOKE.
GRANT: It enables system administrators to assign privileges and roles to the specific user
accounts to perform specific tasks on the database.
REVOKE: It enables system administrators to revoke privileges and roles from the user
accounts so that they cannot use the previously assigned permission on the database.
Purpose of DCL: allows users to control access and permission management to the database.
4)Transaction Control Language (TCL): It is used to deal with the transaction operations
in the database. The commands in this category are COMMIT, ROLLBACK, SET TRANSACTION,
SAVEPOINT, etc.
4) Primary Key in SQL: A primary key is a field or the combination of fields that uniquely
identify each record in the table.
* A table can have duplicate columns, but it cannot have more than one primary key. It always
stores unique values into a column. For example, the ROLL Number can be treated as the
primary key for a student in the university or college.
5) Foreign Key in SQL: The foreign key is used to link one or more tables together. It is also
known as the referencing key. A foreign key is specified as a key that is related to the primary
key of another table.
6) Unique key in SQL: A unique key is a single or combination of fields that ensure all values
stores in the column will be unique. It means a column cannot stores duplicate values
* For example, the email addresses and roll numbers of student's tables should be unique.
Unique Key
Primary Key
The unique key is also a unique identifier for records when the primary key is not present in the table.
The primary key act as a unique identifier for each record in
the table.
We can store NULL value in the unique key column, but only one NULL is allowed.
We cannot store NULL values in the primary key column.
8) Trigger in SQL: Triggers are database object. Basically, these are a special type of stored
procedure that is automatically executed when a DDL or DML command statement related to
the trigger is executed.
9) join in SQL: A JOIN clause is used to combine rows from two or more tables.
11) TABLE IN SQL: Tables are database objects that contain all the data in a database. In tables,
data is logically organized in a row and column format.
12) Uses of TABLES in database: It can used to both store and display data in a structured
format.
13)Relationships: This option provides to define a foreign key relationship with the other
tables.
14)INDEXES/KEYS: We can create indexes or set unique constraints for the columns.
15)Check constraints: This are used to control according to specified rule that the data will be
stored by the columns.
HR INTERVIEW QUESTIONS:
Ans: Long term goal: My long-term goal is to be a successful person and to make my parents
feel proud.
Short term goal: My short-term goal is to get placed in any reputed company like yours.
Ans: I am interested in this job because I can see that in this role my skills could help solve this
problem within your company. I can also see an opportunity for me to learn and grow skills.
Ans: Doing something that makes you happy and send something that you enjoy.
4)Are you Ok with nightshifts? (or) Are you comfortable with nightshifts?
Ans: It is not like a impossible thing for me but I will prefer to work in day shift because of my
health and mental fitness. But if needed in urgent I will be available.
Ans: For this right opportunity I am willing to relocate I believe that this position and company
is that opportunity.
Ans: The most significant advantage of working for a small company is having the opportunity
to work on a variety of tasks. I want to work for a large company because there are different
opportunities within the company. I also feel a larger company provides better training.
Ans: Smart work and hard work are related to each other. Without being a hard worker, we
can't be a smart worker. Smart worker comes from the hard worker. So, hard work increases
your accuracy and smart work increases accuracy as well as efficiency.
Ans: As of now, I haven't thought much about it. I am more focused on learning the
requirements for this position that I am applying for.
Ans: My strength is my ability to convert negative work environment into positive. At the same time, developing
a supportive team. I am also capable of keeping many projects on track and ensuring deadlines are met. As far as
my weakness is concerned, I get impatient sometimes to get everything done very quickly. To tackle the problem,
I am trying to re-consider the to-do list and prioritize the tasks.
Ans: Original, Genuine, Logical, Incredible, Focused, Curious, Active, Balanced, Quick.
12)Why are you applying for this job? / Why this role attracts you / Why you want to join this
company?
Ans: I have applied for this vacancy because it is an excellent match for my skills and
experience. This role is exactly the sort of role I am currently targeting, and I am confident I
will be able to make a major contribution.
Ans: I get to know about your company from several online websites./College placements.
Ans: Working in teams increases collaboration and brainstorming. As a result, more ideas are
developed, and productivity improves 2 or more people are always better than one for solving
problems, finishing off difficult tasks and increasing creativity.
3)Be open
*KARE was established in 1984 by the kalasalingam Anandham Ammal charities. It was granted
deemed to be University status in 2006.
*KARE was ranked 61 among Engineering colleges by the National institutional Ranking
Framework (NIRF) in 2019.
Ans: Over the next few years, I want to explore and develop skills in project management. In 5
years, I want to have gained experience in leading projects for major clients. I will be looking
for opportunities to expand my responsibilities within this role to work towards my goal.
1)Do you think I am missing any qualifications needed for this position?
2)What are the goals the company has for the next year?
6)How has the company grown over the last five years?
NOTE: You never say NO for this question. You can ask at least 3-4 questions while they
ask you this question.
Ans: “Learning new things every day for my individual growth has been a great motivating aspect of
my life. It has also made me pick new hobbies such as music.”
Ans: “My friends would describe me as a great listener and a problem solver. Some of my friends
probably say that I am very organized and reliable.”
Ans: “I would consider myself to be neither an extreme risk-taker nor a total stuffed shirt. Taking a risk
depends on the situation presented. I do not oppose it when it’s necessary.”
Ans: I am honest and truthful. I would certainly not prefer lying, but my teacher once said- “If you had
to choose between being right or being kind, always choose kind”
27) How long you are planning to work with us if I hire you?
Ans: "If I get hired, I am planning to work in this company for as long as there is mutual growth of the
company as well as me."
Ans: Playing and watching Cricket, playing carroms and badminton, Listening to Music and
browsing the internet.
Ans: A good leader, in my view, is someone who can make choices while still
respecting the thoughts and concerns of others. This often requires being able to
admit whether you’re mistaken or failing in any way.
Ans: Working under pressure, in my opinion, can also be beneficial rather than
harmful. It has taught me how to set priorities and maintain a healthy work-life
balance.
34) What are you expecting from this job? (Or) Why do you want to work in this company?
Ans: I’ve known for a long time that doing the same thing every day isn’t my thing.
And, based on what you’ve told me about the work position, it seems to be
interesting and just what I’m looking for. I’ll be working on a variety of designs,
and this one will be exclusive and exciting.
Ans: Despite performing well in the selection process, if I am not chosen then, your
expectations from the applicant in terms of performance are more. Next time, I’d give my best,
and meanwhile, I’m going to focus on strengthening my skills.
Ans: While I have no plans to seek an advanced degree at this time, I am open to further
education, whether it be internal or external. Since technology shifts so quickly in our industry,
I try to stay on top of it in my own personal research.
Ans: Sure Sir/Madam, I’m willing to sign the bond if I’m having everything I’ve been waiting for
in a dream job and if you think I’m the best choice for this role.
38) If you get a job with higher package from here, what will you do?
Ans: My work is very important to me. Money certainly plays an important role in our survival
and living conditions, but I’d rather take a career that I like rather than flipping (turn over) jobs
for the money.
39) Can you work under pressure? (Or) Describe your ability to work under pressure?
Ans: Working under pressure has always been a learning experience for me because it helps
me grow. I have always worked well during deadline, and I always learned how to work more
efficiently afterward.
Ans: I am not a short-tempered person, but I feel a bit of annoyance when someone
Ans: I will rate myself 8 out of 10 because I would never like to think that there should be a
room left for putting in more efforts. That thought will create an interest in learning the things.
Ans: I would say that work is more important. If we work and achieve company goals then
Ans: I know that in the company being asked to work for an extended number of hours comes
with a good reason, so I am ok with it. It an extra effort means I am doing something for the
company, I will be happy to do it.
Ans: I am a fresher and I hardly have any exposure of the corporate world. As far as nightshifts are
concerned, I would like to say that I am a night person and I like to do my studies generally at night. I
have no issues working during weekends and at night, provided I get enough balanced to relax.
47) Do you consider yourself successful?
Ans: Success to me is spending most of the time focused on work that is fulfilling and increasing my
efficiency to become helpful for the organization growth. While I also believe that greater success can
be achieved while working as a team towards a common goal.
48) Are you willing to travel?
Ans: Yes. I love traveling. Adjusting to new places and meeting new people would be a delightful
experience for me.
49) Tell me about your dream job?
Ans: The only dream job I’ve always had was a job that keeps me busy, a job wherein I get to contribute
to the company’s success
50)Are you a team player?
Ans: Yes. While I will deny the fact that I can work independently with minimal supervision, I’m also
one companion every leader would ever want to be in his team. Whatever task is assigned to me, I make
sure it meets and exceeds what is expected of me. I also make it a point to reach out to teammates
whenever needed.
51) What is your Philosophy towards work?
Ans: I have only one philosophy when it comes to work: every piece of work, regardless of size, must
be done on time and in the right manner.
52) What have you learned mistakes from the job?
Ans: I learned that without proper coordination, even the simplest task could cause problems in a
project. I had this problem during my first job. From that time on, I made sure every I think follows
every detail and coordination.
53)How would you know you are successful in this job?
Ans: Being successful means goals that are set are being met. Being successful also means standards
are not only reached but also exceeded wherever possible.
54) What have you done to improve your knowledge in last year?
Ans: I have attended several self-improvements, time management, and personality development
seminars.
55) Why do you think you would do well at this job?
Ans: Because I love this job, I feel very confident of myself and my ability to deliver nothing short of
quality output. My years of experience helped me develop these skills.
56) What irritates you about co-workers?
Ans: I always get along fine with my co-workers. I tend to be open-minded and very considerate.
57) Do your skills match this job or another job more closely?
Ans: I feel my skills are best fit for this job.
58) What has disappointed you about work?
Ans: I once felt that I was not being given enough challenges to work on. I was a bit disappointed
because I was so eager to go for more.
59) If you were hiring a manager for this job, what would you look for?
Ans: I would look into two essential things: the ability to do the job right and the proper attitude to do
it. Skills without the right attitude will not contribute to productive output.
60) What role do you tend to play in a team?
Ans: I tend to be versatile when it comes to being a team player. I can act as a leader, an assistant, a
communicator, a secretary, whatever role that will ensure the success of the team. That’s because
understanding the different roles will allow each player to take on the role of others, in times of need.
61) What was the most difficult decision for you made?
Ans: It was a time when I had to choose between joining a group of employees protesting some issues
in the company and staying away from the issue. I ended up being a mediator between the employees
and our immediate supervisor, and I was glad I made that decision because it all ended well and
without further conflicts in the workplace.
62) Are you willing to make sacrifices for this company?
Ans: I would be willing to do that to the best of my ability. I can manage personal matters on my own
without causing conflicts when management needs me most. However, I will not comprise on my
values.
63) What are the qualities do you look for in a boss?
Ans: I look at my boss as a person who can easily relate with me, can make firm decisions, and is
transparent. A boss with a sense of humour would also be a delightful idea.
64) Are you applying to other companies as well?
Ans: Yes. I have submitted my applications in some of the best companies like [mention some
company names]. Above all, my priority and hope are that I will be able to land a job in your
company.
65) Do you know anyone who works in our company?
Ans: No. I found your ads in a popular job posting website.
* If yes say their name and say how that person relates to you, job role and work experience (in
years).
66) How do you propose to compensate for your lack of experience?
Ans: I am a quick learner. Every time there is something new thrown at me, I take time to study it at
the soonest time.
67) Have you ever worked in a job that you hated?
Ans: Not exactly hated. I once had a job that does not exactly match my qualification. Nevertheless, I
was glad I took the job because it was an opportunity to learn something new and added to my list of
experience.
68) What would your previous supervisor say your best point is?
Ans: Some of my strongest points at work are being hardworking, patient, and a quick learner.
69) What is the most challenging thing about working with you?
Ans: My co-workers often say I’m too serious about my work. However, I have attended some
personality enhancing seminars to blend better with colleagues.
70) What suggestion/s have you made in your previous employment that was implemented?
Ans: I once suggested that management and staff should have more regular meetings instead of
quarterly meetings. I was happy that the administration took note of this and even commended me for
taking a good initiative.
71) Would you rather be liked or feared?
Ans: I would like to be liked, but more importantly, I would prefer to be respected. Being feared does
not necessarily command respect.
72) How do you cope with stress?
Ans: I pause for a few minutes, look out into the window. Brief pauses in enough to get me charged
again. I can manage stress well enough and does not decrease my productivity level.
73) Would you rather work for money or job satisfaction?
Ans: Job satisfaction is more important to me. Working just for the money may not be fulfilling if I
don’t like the job in the first place. Job satisfaction makes me stay productive; money would naturally
come along as well.
74) Describe your work policy ethics.
Ans: Always give my best in every job, if not, don’t do it at all.
75) What was your biggest challenge with your previous boss?
Ans: My previous boss was very strict when it came to deadlines and output. It was a challenge for
me to meet every expectation he made. It was also a good learning experience for me because it only
made me better at what I do.
76) Do you enjoy working as part of a team?
Ans: Yes, I enjoy it very much. Being part of a team means you get to contribute for the good of all,
while at the same time there’s are members who can support you and share more knowledge with you.
77) Why do you think you deserve this job?
Ans: Because I believe my talents and skills will be a big contribution to your company’s continuing
pursuit of excellence. I’m a fast worker and hardworking person who can be a very reliable asset to
this company.
78) Has anything ever irritated you about people you’ve worked with?
Ans: I go along fine with co-workers. When I feel the other guy’s, attitude is a negative one; I try my
best to approach him and talk things over. I always make it a point to stay positive and transparent
with people around me.
1) FACTORIAL OF A NUMBER.
2) FIBONACCI SERIES.
3) SWAPPING OF TWO NUMBERS WITHOUT THIRD VARIABLE.
#include <stdio.h>
int main()
{
int num, count, sum = 0;
return 0;
}
Output
EXPLANATION:
The value entered by the user is stored in the variable num . Suppose, the
user entered 10.
The count is initialized to 1 and the test expression is evaluated. Since the
test expression count<=num (1 less than or equal to 10) is true, the body
of for loop is executed and the value of sum will equal to 1.
Then, the update statement ++count is executed and count will equal to 2.
Again, the test expression is evaluated. Since 2 is also less than 10, the
test expression is evaluated to true and the body of the for loop is executed.
Now, sum will equal 3.
This process goes on and the sum is calculated until the count reaches 11.
When the count is 11, the test expression is evaluated to 0 (false), and the
loop terminates.
Then, the value of sum is printed on the screen.
This process goes on until the test expression is false. When the test
expression is false, the loop terminates.
2) FIBONACII SERIES
The Fibonacci sequence is a sequence where the next term is the sum of
the previous two terms.
#include <stdio.h>
int main() {
int i, n;
return 0;
}
Output
Let us suppose n = 10 . First, we have printed the first two terms of the
Fibonacci sequence before using a for loop to print the next n terms.
i t1 t2 nextTerm
3 0 1 1
4 1 1 2
5 1 2 3
6 2 3 5
7 3 5 8
8 5 8 13
9 8 13 21
10 13 21 34
Output:
4) REVERSE OF A NUMBER:
#include <stdio.h>
int main() {
int n, rev = 0, remainder;
printf("Enter an integer: ");
scanf("%d", &n);
while (n != 0) {
remainder = n % 10;
rev = rev * 10 + remainder;
n /= 10;
}
printf("Reversed number = %d", rev);
return 0;
}
Output
EXPLANATION:
This program takes an integer input from the user. Then the while loop is
used until n != 0 is false (0).
5) ARMSTRONG NUMBER:
A positive integer is called an Armstrong number (of order n ) if
abcd... = an + bn + cn + dn +
CODE IN C LANG:
#include <stdio.h>
int main() {
int num, originalNum, remainder, result = 0;
printf("Enter a three-digit integer: ");
scanf("%d", &num);
originalNum = num;
while (originalNum != 0) {
// remainder contains the last digit
remainder = originalNum % 10;
if (result == num)
printf("%d is an Armstrong number.", num);
else
printf("%d is not an Armstrong number.", num);
return 0;
}
Output
EXPLANATION:
#include <stdio.h>
int main() {
int n, reversed = 0, remainder, original;
printf("Enter an integer: ");
scanf("%d", &n);
original = n;
return 0;
}
Output
EXPLANATION:
#include <stdio.h>
int main() {
int n, i, flag = 0;
printf("Enter a positive integer: ");
scanf("%d", &n);
return 0;
}
Output
if (n % i == 0) {
flag = 1;
break;
}
1. s=input().split()
2. print(len(s))
Explanation:
Split means divide the input from the string according to the space.
For example, if we take "hello world" this will be splitted as [" hello", "world"].
#include<iostream>
using namespace std;
int main() {
int array[5], i;
int lg, sm;
lg = array[0];
sm = array[0];
return 0;
}
Output:
Enter the size of the array: 5
Enter the elements of the array: 1 2 3 4 5
Largest element: 5
Smallest element: 1
Program Explanation:
1. The user is initially asked to enter the size of the array and it is stored in the variable
‘n’.
2. An array ‘arr’ of data type integer is declared with size 10.
3. Elements of the array are asked to enter and stored in ‘arr’ using a for loop.
4. The value at index 0 of arr is assigned to the variable ‘max’.
5. Using a for loop and initializing ‘i’ as 0, the largest element is found.
6. If max is less than arr[i], then value of arr[i] is assigned to max. i is incremented in
every iteration.
7. The loop continues till ‘i’ is less than ‘n’.
8. Similarly, the smallest element is found.
9. The value at index 0 of arr is assigned to the variable ‘min’.
10. Using a for loop the smallest element is assigned to min.
11. The result is then printed.
list_1 = [1, 2, 1, 4, 6]
print(list(set(list_1)))
OUTPUT: [1, 2, 4, 6]
Explanation: In the above example, we first convert the list into a set, then we
again convert it into a list. Set cannot have a duplicate item in it, so set() keeps
only an instance of the item.
EXAMPLE -2: Remove the items that are duplicated in two lists
list_1 = [1, 2, 1, 4, 6]
list_2 = [7, 8, 2, 1]
print(list(set(list_1) ^ set(list_2)))
OUTPUT:
[4, 6, 7, 8]
Explanation: In the above example, the items that are present in both lists are removed.
Firstly, both lists are converted to two sets to remove the duplicate items from each
list.
Then, ^ gets the symmetric difference of two lists (excludes the overlapping elements
of two sets).
array = [2, 4, 0, 1, 9]
x=1
n = len(array)
result = linearSearch(array, n, x)
if(result == -1):
print("Element not found")
else:
print("Element found at index: ", result)
Time Complexity: O(n)
# Repeat until the pointers low and high meet each other
while low <= high:
if array[mid] == x:
return mid
else:
high = mid - 1
return -1
array = [3, 4, 5, 6, 7, 8, 9]
x=4
if result != -1:
print("Element is present at index " + str(result))
else:
print("Not found")
Time Complexities:
Best case complexity: O(1)
Space Complexity:O(1)
Initial array
Setting pointers
Find the middle element mid of the array ie. arr[(low + high)/2] = 6 .
Mid element
If x == mid, then return mid. Else, compare the element to be searched with m.
If x > mid , compare x with the middle element of the elements on the right side of mid . This
is done by setting low to low = mid + 1 .
Else, compare x with the middle element of the elements on the left side of mid . This is
x = 4 is found. Found
#include <stdio.h>
int main() {
char line[150];
int vowels, consonant, digit, space;
return 0;
}
OUTPUT:
EXPLANATION:
Here, the string entered by the user is stored in the line variable.
Initially, the variables vowel, consonant, digit, and space are initialized to 0.
Then, a for loop is used to iterate over the characters of the string. In each iteration, we:
by 1.
When the loop ends, the number of vowels, consonants, digits, and white spaces are stored
in variables vowel, consonant, digit, and space respectively.
Note: We have used the tolower() function to simplify our program. To use
this function, we need to import the ctype.h header file.
14) ADDITION/SUM OF TWO NUMBERS:
num1 = 1.5
num2 = 6.3
Output
EXPLANATION:
In this program, we asked the user to enter two numbers and this program displays the sum
We use the built-in function input() to take the input. Since, input() returns a string, we
convert the string into number using the float() function. Then, the numbers are added.