Associate Software Engineer Trainee
Associate Software Engineer Trainee Interview Questions and Answers for Freshers
Q1. 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
Q2. leetcode problem last-stone-weight, changed stones to monsters and weights to powers
Simulate smashing monsters with powers until only one remains.
Create a max heap to store the powers of monsters.
Repeatedly smash the two monsters with the highest powers until only one remains.
Return the power of the last remaining monster.
Q3. 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
Q4. 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; }
Q5. 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'};
Q6. Process vs Thread
Processes are independent instances of a program, while threads are smaller units within a process that can run concurrently.
Processes have their own memory space, while threads share memory within a process.
Processes are heavyweight, while threads are lightweight.
Processes communicate with each other through inter-process communication mechanisms, while threads can communicate directly.
Example: A web browser running multiple tabs is a process, and each tab running JavaScript...read more
Share interview questions and help millions of jobseekers 🌟
Associate Software Engineer Trainee Jobs
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month