Reflectance sensor

I am trying to understand the sample code below to implement the sensor into my project.

#define NUM_SENSORS             1  // number of sensors used
#define NUM_SAMPLES_PER_SENSOR  4  // average 4 analog samples per sensor reading
#define EMITTER_PIN             2  // emitter is controlled by digital pin 2

// sensors 0 through 5 are connected to analog inputs 0 through 5, respectively
QTRSensorsAnalog qtra((unsigned char[]) {2,}, 
  NUM_SENSORS, NUM_SAMPLES_PER_SENSOR, EMITTER_PIN);
unsigned int sensorValues[NUM_SENSORS];

void setup()
{
  delay(500);
  Serial.begin(9600); // set the data rate in bits per second for serial data transmission
  delay(1000);
}


void loop()
{
  // read raw sensor values
  qtra.read(sensorValues);
  
  // print the sensor values as numbers from 0 to 1023, where 0 means maximum reflectance and
  // 1023 means minimum reflectance
  for (unsigned char i = 0; i < NUM_SENSORS; i++)
  {
    Serial.print(sensorValues[i]);
  //  Serial.print('\t'); // tab to format the raw data into columns in the Serial monitor
    Serial.print("Sensing...");
   }
  Serial.println();
  
  delay(250);
}

I have two questions,

1: what exactly does the line in the code below do?

for (unsigned char i = 0; i < NUM_SENSORS; i++)

..............

oh i'm see code pro c#

^ what?

for (unsigned char i = 0; i < NUM_SENSORS; i++)

That is the start of a for loop. The loop in the brackets below prints all the sensor values, which were stored in an array by the statement

qtra.read(sensorValues);

If you wish to access an individual sensor value, you need to know its index, as follows:

if (sensorValues[2]  > 1000 ) {do something;}

Thank for the insight,

I did some reseach on the pololu website about the code, but I still have some questions:

  1. Why do they keep creating UNSIGNED variables? is there any advantage to this as compared to saying

int sensorValues[NUM_SENSORS];

What exactly does this line mean? I can seem to find it an ans.

QTRSensorsAnalog qtra((unsigned char[]) {2,},
NUM_SENSORS, NUM_SAMPLES_PER_SENSOR, EMITTER_PIN);

I got it to work, thank you for your help.

I think found the answer to my previous question:

QTRSensorsAnalog qtra((unsigned char[]) {2,},

^ that is just something I HAVE to use with their component, I guess that is how you call the library?