Senior Executive Development
Senior Executive Development Interview Questions and Answers
Updated 2 May 2021
Q1. What is the diffrence between for and foreach loop?
Ans.
For loop is used for iterating over a sequence while foreach loop is used for iterating over elements of an array.
For loop is more flexible and can be used for iterating over any sequence, not just arrays
Foreach loop is simpler and more concise, especially when dealing with arrays
For loop requires an index variable while foreach loop does not
Example: for(int i=0; i
Example: foreach(string s in array) { //do something }
Senior Executive Development Jobs
0Are these interview questions helpful?
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
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
Share an Interview
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app