Reading and writing to a single digital pin

 if(buttonState_1 == 0)   // Button 1 is pressed. Switch shorted with ground
  {
    // If this button is pressed, the rest of the buttons (button 2 in trial case) should go off
    pinMode(button_2,INPUT);
    digitalWrite(button_2,HIGH); // these two statements must ideally turn off the LED in other pins or does it?
    
    pinMode(button_1, OUTPUT); // Change from Input to Output Mode
    digitalWrite(button_1,LOW);  // Write Low in the pin so that pin continues to glow even after button press is released 
  }

Its entering this if statement but not actually executing first 2 statements. (Or rather I cant see the effect happening anyway)

Perhaps the thing that you need to do is turn the other pin(s) off, first, and then change them to input. Toggling the state of an input pin only turns on and off the pullup resistor, not the pin.

Tried that already with a digitalWrite(button_2,HIGH); like

 if(buttonState_1 == 0)   // Button 1 is pressed. Switch shorted with ground
  {
    digitalWrite(button_2,HIGH);
    // If this button is pressed, the rest of the buttons (button 2 in trial case) should go off
    pinMode(button_2,INPUT);
    digitalWrite(button_2,HIGH); // these two statements must ideally turn off the LED in other pins or does it?
    
    pinMode(button_1, OUTPUT); // Change from Input to Output Mode
    digitalWrite(button_1,LOW);  // Write Low in the pin so that pin continues to glow even after button press is released 
  }

It didnt cause any change in the output...