function to increment values in the given range by a value d for multiple queries
void incrementByD ( int arr [ ] , struct query q_arr [ ] , int n , int m , int d ) { int sum [ n ] ; memset ( sum , 0 , sizeof ( sum ) ) ;