Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8515145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:04:08+00:00 2026-06-11T05:04:08+00:00

In many code reviews they suggest dont use i, j as variables..Is there any

  • 0

In many code reviews they suggest dont use i, j as variables..Is there any specific reason to avoid using i, j in for loop.

e.g

for (int i=0; i<10; i++ )
{

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:04:10+00:00Added an answer on June 11, 2026 at 5:04 am

    The basic guideline is to use variable names that are meaningful. i isn’t very meaningfull, however, inside a for loop it often isn’t a problem, when the scope of the for loop is really small. One letter variables for loop variables is very intuitive for most developers, and when that variable is only used in one or two lines, it isn’t that big of a deal. When the scope gets bigger on the other hand, it gets harder to follow what i actually is. But than again, you should normally not have more than one line of code (just a method call) in a for loop anyway, to keep your code as readable as possible.

    Still, even with a loop with a body of a single line, I would prefer a more meaningful name than i. For instance, what exactly does that i variable represent? If you can give it a more meaningfull name, such as index or rowNumber, you should do so. It makes your code more understandable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In many code samples, people usually use '\0' after creating a new char array
We have a sub-project 'commonUtils' that has many generic code-snippets used across the parent
I have a C++ code containig many for-loops parallelized with openMP on a 8-thread
I have a legacy fortran code with many statements like 'goto 50'. I was
Basic question here - I have many lines of code that look something like:
I have the code below in my test code in many places: // //
I am newbie. many of javascript code start with <!-- <script type=text/javascript> <!-- and
I am new to java, I have seen in the code at many places
Now I have a python project, I write my unit-testing code in many of
I can't find the problem. Why is this code making many copies of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.