Torry Harris Integration Solutions
10+ ICICI Bank Interview Questions and Answers
Q1. Program to split the two strings
Program to split two strings into an array of strings
Use the split() method to split the strings
Specify the delimiter to split the strings
Store the split strings in an array
Q2. Why this() is used in java
this() is used in Java to call a constructor of the same class.
this() can be used to call a constructor with default arguments.
It can also be used to call a constructor with specific arguments.
this() must be the first statement in a constructor.
It can only be used inside a constructor.
Example: public MyClass(int x) { this(x, 0); }
Example: public MyClass(int x, int y) { this.x = x; this.y = y; }
Q3. All concepts in oops
Object-oriented programming concepts including encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: bundling data and methods that operate on that data within a single unit
Inheritance: creating new classes from existing ones, inheriting their properties and methods
Polymorphism: ability of objects to take on multiple forms, often achieved through method overriding
Abstraction: hiding implementation details and only exposing necessary information to users
Q4. Call by reference vs call by value
Call by reference passes the address of the variable while call by value passes the value itself.
Call by reference allows the function to modify the original variable
Call by value creates a copy of the variable for the function to use
Call by reference is more memory efficient for large data types
Call by value is safer as it prevents unintended changes to the original variable
Q5. Garbage collection in java
Garbage collection is an automatic memory management process in Java.
Garbage collection frees up memory by removing objects that are no longer in use.
Java uses a mark-and-sweep algorithm to identify and remove unused objects.
The System.gc() method can be used to suggest garbage collection, but it is not guaranteed to run immediately.
Garbage collection can impact performance, so it is important to optimize code to minimize unnecessary object creation.
Q6. Any idea on git
Git is a version control system used for tracking changes in code and collaborating with others.
Git allows for branching and merging of code
It tracks changes made to code over time
It allows for collaboration with others on the same codebase
Git can be used for both personal and professional projects
Q7. Structure vs union
Structures and unions are used to group related data members in a program.
Structures are used to group related data members of different data types.
Unions are used to group related data members of the same data type.
Structures allocate memory for each data member, while unions allocate memory for the largest data member.
Structures are used when all data members need to be accessed separately, while unions are used when only one data member needs to be accessed at a time.
Q8. 3) What are call by reference and call by value?
Call by reference and call by value are two ways of passing arguments to a function.
Call by value passes a copy of the argument to the function, while call by reference passes a reference to the original argument.
In call by value, changes made to the argument inside the function do not affect the original value, while in call by reference, changes made to the argument inside the function affect the original value.
Call by value is used for simple data types like integers and f...read more
Q9. 4) How do you delete file in python?
To delete a file in Python, use the os.remove() method.
Import the os module
Use os.remove() method to delete the file
Specify the file path as the argument to os.remove() method
Q10. 2) What are Pointers?
Pointers are variables that store memory addresses of other variables.
Pointers allow direct access to memory locations.
They can be used to pass values between functions.
Pointers can be used to create dynamic data structures.
Example: int *ptr; ptr = # *ptr = 10;
Example: void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
Q11. 1) What are Arrays?
Arrays are a collection of similar data types stored in contiguous memory locations.
Arrays can be of any data type, including integers, floats, characters, and objects.
Arrays are accessed using an index starting from 0.
Arrays can be one-dimensional, two-dimensional, or multi-dimensional.
Example: int arr[5] = {1, 2, 3, 4, 5};
Example: char str[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
Q12. What are pointers and related topics
Pointers are variables that store memory addresses. They are used to manipulate data and create dynamic data structures.
Pointers are used to pass memory addresses as arguments to functions
They can be used to dynamically allocate memory
Pointers can be used to create linked lists and trees
They can also be used to access hardware directly
Null pointers are used to indicate that a pointer does not point to a valid memory address
Q13. swapping of numbers program and explanation
Q14. What are storage specifiers
Storage specifiers are keywords used in programming languages to define the scope and lifetime of variables.
Storage specifiers determine where a variable is stored in memory and how long it will exist.
Examples of storage specifiers include 'static', 'auto', 'register', and 'extern'.
Static variables have a lifetime that lasts for the entire program execution, while auto variables have a lifetime that lasts only within the block in which they are defined.
Register variables are ...read more
Q15. palandrome number program and explanation
A palindrome number program checks if a number reads the same forwards and backwards.
Create a function that takes a number as input
Convert the number to a string to easily compare characters
Check if the string is equal to its reverse to determine if it's a palindrome
Top HR Questions asked in ICICI Bank
Interview Process at ICICI Bank
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month