Why this" i" in every for loop (outer) and "j" in inner for loop?

One idea is that i is used for "index".

One major factor for such practice could be the resources available. Majority of programming books and online resources follow the same notation. They tend to use 'i' for outer and 'j' for the inner loop, irrespective of the programming language used. While starting to program, you can easily get used to what you see regularly.

Why is it 'i' and not 'a' or 'b'? Well, loops are normally used while iterating an array. The elements are accessed through their index. Instead of using the name 'index', I can simply use 'i'. What about 'j'? I really don't know. Let me guess. The letter 'j' follows 'i'.


i and j have been used in maths long before it was used in programming. It is also used in papers that predate higher level languages (remember seeing stuff like  "Xi,j").

Well when fortran was designed they apparently followed the same trend, that they assigned alphabets starting with i to n to integers and and all other would default to real number(floating point).

Most people seem to have seen little reason to change that. It's widely known and understood, and quite succinct. Every once in a while you see something written by some psychotic who thinks there's a real advantage to something like:

for (int outer_index_variable=0; outer_index_variable < 10; outer_index_variable++)  
 for (int inner_index_variable=0; inner_index_variable<10;        inner_index_variable++)   
      x[outer_index_variable][inner_index_variable] = 0;

Thankfully this is pretty rare though, and most style guides now point out that while long, descriptive variable names can be useful, you don't always need them, especially for something like this where the variable's scope is only a line or two of code.

CodeIgniter: Best PHP Framework for beginner

After writing first post on CodeIgniter I decided to write this.

CodeIgniter is better for a beginner.
If you know PHP programming (basics), CodeIgniter is for you.

All frameworks I can think of in the PHP world are strongly object oriented, so provided you're comfortable with that, you should be in a good place to make a start. The advantage with using a framework is that you can learn best practices, which is especially important in the PHP ecosystem - as a PHP programmer myself I can tell you that there are a number of poor practices that are passed around on blogs etc, and it will pay to learn from the correct sources.

As we know, Codeigniter is a Model/View/Controller (MVC) based framework so this is best structure to build any application. Each request comes to controller and performing any database interaction though Model, all out put goes to View for the end result. Where as, in custom PHP each single page serves as MVC where we can see so much complexity.

Pros of CodeIgniter: 

  • Super easy to set up and use. This makes the entry level for a newer PHP developer much lower.
  • Extremely well-documented, with examples in a lot of places to illustrate usage.
  • Extremely fast.
  • Huge community. As with Cake, since CI has been around so long you can almost always find your answer via Google, CI forums, or their IRC channel. This also means there’s lots of code contribution to help get things done (like Paypal libraries, etc)

Ready to Go & Almost Zero Configuration:
If you are going to start a new project with custom PHP then you obviously need to set and collect couple of files to get this start. You must need to build database & other configuration files. Mostly, developers have to write everything from scratch. In Custom development, we will see database queries and other php functions being used directly into lot of files. Following are few files we need in custom development.

Custom PHP
– connection.php
– config.php
– Database.Class.php
– login.php
– logout.php

In Codeigniter we dont need to worry about such classes and configurations. We will only need to download latest version from there website and after unzipping and setting up few things you are ready to go. The whole zip comes with 3 folders usually,

– application
– system
– user_guide

The system/ folder contains all libraries and classes which we can add and use in our application. We dont need to do anything with system folder because all our work will go to application folder. The application folder is a set of folders and each folder name defines the purpose of its creation.

These two files are needed to setup in CodeIgniter:

– application/config/config.php file with a text editor and set your base URL.
– application/config/database.php If you intend to use a database then set your database settings.

Download CodeIgniter from here.

OOPs Questions with Answers: Important for Interview

Q. Which of the following is not a type of constructor?

A. Copy constructor
B. Friend constructor
C. Default constructor
D. Parameterized constructor

Q. Which of the following type of class allows only one object of it to be created?

A. Virtual class
B. Abstract class
C. Singleton class
D. Friend class

Q. Which of the following concepts means waiting until runtime to determine which function to call?

A. Data hiding
B. Dynamic casting
C. Dynamic binding
D. Dynamic loading

Q. How "Late binding" is implemented in C++?

A. Using C++ tables
B. Using Virtual tables
C. Using Indexed virtual tables
D. Using polymorphic tables

Q. Which of the following is correct about class and structure?

A. class can have member functions while structure cannot.
B. class data members are public by default while that of structure are private.
C. Pointer to structure or classes cannot be declared.
D. class data members are private by default while that of structure are public by default.

Q. Which of the following concepts means determining at runtime what method to invoke?

A. Data hiding
B. Dynamic Typing
C. Dynamic binding
D. Dynamic loading

Q. Which of the following is an invalid visibility label while inheriting a class?

A. public
B. private
C. protected
D. friend

KPIT Technologies is hiring

Designation: KPIT Hiring Matlab Professionals @ Pune - 3 Opening(s)

Experience: 3 - 8 Years
Industry Type: IT-Software / Software Services
Role: Design Engineer
Functional Area: Engineering Design, R&D

UG - Any Graduate - Any Specialization, Graduation Not Required
PG - Any Postgraduate - Any Specialization, Post Graduation Not Required
Doctorate - Any Doctorate - Any Specialization, Doctorate Not Required

Web: http://www.kpit.com

Other Jobs Available


KPIT Technologies Limited (BSE: 532400; NSE: KPIT), a trusted global IT Consulting and product engineering partner, is focused on co-innovating domain intensive technology solutions for Manufacturing and Energy &amp; Utilities corporations to help customers become efficient, integrated and innovative enterprises. It helps its customers globalize efficiently &amp; bring complex technology products/ systems faster to their global markets.

Whether your interest lies in automotive engineering, research, sales, chip design or software development, or corporate communications, KPIT Technologies is the perfect place for you.

Jobs at PUNE: Current openings

Recruitment at Pune:

Hi friends we got some important information for IT students : BCA/BBA/MCM/MCA/MSC/BE/IT/BSC

Open positions:
Software Engineering-

PHP Web Developer

Front End Developer - BSMO

Frontend Developer – HTML5

Java/J2EE Developer

UI Developer

Java Developer - Pentaho

Programming Analyst

Sr. Software Engineer- Informatica

Sr. Software Engineer - T3 Support

Sr. Software Engineer- Windows Services

Sr. Software Engineer- MVC2

Software Engineer - Java

Perl Programmer

Sr. Perl Developer

Device Driver Developer - Windows

Software Engineer- HTML

Sr. Software Engineer

Java Developer

Team Lead Java - Server Side

Java Developer


Hiring : ISO Certified Company, PUNE

Good opportunity for freshers!!!

Required: IT marketing Trainee

Qualification: MBA/BBA (appeared/pass-out)
Company Name: Gatitaa, Pune (ISO Certified company)

Call : 9225620366.
Drop Resume on: career@gatitaa.com

Required: PHP developer 

Company Name: Gatitaa, Pune (ISO Certified company)

Skills required : PHP, MYSQL
Experience: 6 months to 1 year
CONTACT : 9225620366.
Drop Resume on career@gatitaa.com

Required: Website Designer

Company Name: Gatitaa, Pune (ISO certified company)

Required Skills: HTML, CSS
contact 07276750434
Send resume on :

For daily updates VISIT & LIKE: Facebook Page