mathison and pangrams

#include<stdio.h>
int main()
{

 int t,arr[26],i;
scanf("%d",&t);
while(t--)
{
	 int sum,temp[26];
	sum=0;
	for(i=0;i<26;i++)
	{
		scanf("%d",&arr[i]);
		temp[i]=0;
	}
	char str[50001];
	scanf("%s",str);
	for(i=0;str[i]!='\0';i++)
	{
		**temp[str[i]-97]++;**
	}
	for(i=0;i<26;i++)
	{
		if(temp[i]==0)
		sum=sum+arr[i];
	}
	printf("%d\n",sum);
}
return 0;

}

please explain me how it will process temp[str[i]-97]++…???

See the ASCII value of str[i].

If str[i] =‘a’ , then its ASCII value is 97, then it becomes temp[97-97]=temp[0]. Similarly for b,c,d …z

then what will be the value of temp[0], temp[1],…temp[26]???
please explain it to me