The problem in your code is that you're adding a to sum at the end of each loop (in the iteration-statement, or the third part of the for statement). Thus, at the end of the last loop that you want to run, a will be 11 – but you add that to sum before the next a <= 10 comparison is made, preventing further iterations. So, your answer is 11 to high.
This confusion arises primarily because of your unconventional placements of the sum += a and a++ statements. Normally, in a for loop, you would have the iteration/increment expression (a++, in your case) in the for statement and the action that you want to occur each time (sum += a) inside the loop.
Thus, a slight rearrangement to the code, as follows, will solve your issue:
int main()
{
int sum = 0;
for (int a = 1; a <= 10; a++) { // Start at a = 1 because adding zero is pointless!
sum += a;
}
printf("The sum of no. from 1 to 10 is--->>%d", sum);
return 0;
}