Trainee Software Engineer Interview Questions

6,739 trainee software engineer interview questions shared by candidates

1.A trader buys and sells stocks on the same day. Each transaction consists of two values: The price at which the trader buys the stock. The price at which the trader sells the stock. The transactions are stored in an integer array such that: The even index (0, 2, 4, …) represents the buy price. The odd index (1, 3, 5, …) represents the sell price. Write a Java program that: 1. Calculates the total number of transactions the trader made. 2. Calculates the total profit, where profit = (sell price – buy price) for each transaction. Finally, print: Number of Transactions: followed by the count. Total Profit: followed by the profit. 2.Puzzle Statement Your friend comes to your home and asks about the ages of your 3 children.Your replied: i)The product of their ages is 72. ii)The sum of their ages is equal to your house number.Your friend still can’t figure out their ages. iii)You then say: “The oldest child likes strawberry ice cream.”
avatar

Software Engineer Trainee

Interviewed at Ideas2IT

4.1
Sep 22, 2025

1.A trader buys and sells stocks on the same day. Each transaction consists of two values: The price at which the trader buys the stock. The price at which the trader sells the stock. The transactions are stored in an integer array such that: The even index (0, 2, 4, …) represents the buy price. The odd index (1, 3, 5, …) represents the sell price. Write a Java program that: 1. Calculates the total number of transactions the trader made. 2. Calculates the total profit, where profit = (sell price – buy price) for each transaction. Finally, print: Number of Transactions: followed by the count. Total Profit: followed by the profit. 2.Puzzle Statement Your friend comes to your home and asks about the ages of your 3 children.Your replied: i)The product of their ages is 72. ii)The sum of their ages is equal to your house number.Your friend still can’t figure out their ages. iii)You then say: “The oldest child likes strawberry ice cream.”

Viewing 1971 - 1980 interview questions

Glassdoor has 6,739 interview questions and reports from Trainee software engineer interviews. Prepare for your interview. Get hired. Love your job.