Driver Code
int main ( ) { int A [ ] = { 1 , 2 , 3 , 5 , 8 } ; int n = sizeof ( A ) / sizeof ( int ) ; int q [ ] [ 3 ] = { { 1 , 0 , 2 } , { 2 , 5 , 0 } , { 1 , 3 , 5 } } ; performQueries ( A , n , q ) ; }