Question 1: Syntax errors [10]

Identify at least 10 syntax errors in the following C++ program:

For each error, be sure to give the line number and briefly explain the precise nature of the error.

Note: No line contains 2 errors. If there are 2 errors on the same line it is part of the same error.

1  #include [cstdio]
2  int A = { 3, 1, 4, 5, 6, 2};
3
4  void swap(int index1, int index2)
5  {
6     temp = A[index1];
7     A[index1] = A[index2];
8     A[index2] = temp;
9  }
10
11 void printArray()
12    printf("      [");
13    for(int i = 0; i < 6; i++)
14    {
15       printf("%d, ", A[i]);
16    }
17    printf("]\n");
18 }
19
20 int partition(int low, int high)
21 {
22    printf("   Partition(A, %d, %d)\n", low, high);
23    int pivot = [Alow];
24    int leftwall = low;
25
26    for (int i = low+1, i <= high , i++)
27    {
28       if (A[i] < pivot)
29       {
30          leftwall++;
31          swap(i, leftwall);
32       }
33    }
34    swamp(low,leftwall);
35    printf("      Pivot %d\n, pivot);
36    printf("      LeftWall \n", leftwall);
37    printArray();
38    return(leftwall);
39 }
40
41 void quicksort(int low, int high)
42 {
43    printf(`Quicksort(A, %d, %d)\n', low, high);
44    if (low < high)
45    {
46       int pivot == partition(low, high);
47       quicksort(low, pivot-1);
48       quicksort(pivot+1, high);
49    }
50 }
51
52 void main()
53 {
54    quicksort(0, 5);
55 }