Driver Code
int main ( ) { int arr [ ] = { 2 , 3 , 6 , 7 , 4 , 5 , 30 } ; int queries [ ] = { 6 , 5 } ; int N = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; int M = sizeof ( queries ) / sizeof ( queries [ 0 ] ) ; calculateQuery ( arr , N , queries , M ) ; return 0 ; }