Internal pull up resistance through programming

how to write code for Internal pull up resistance through programming not through hardware??????????????????? Can anyone help me out for this problem?????????? can anyone give me a solutions for this??????????????

https://www.arduino.cc/en/Reference/PinMode

Thank you

I need to make pull up resistor for i2c pins ie., A4 and A5 pins in arduino nano???? Can u me help me out for this problem to get a solutions?????????????????

Have you considered using the INPUT_PULLUP parameter of pinMode() ?

Not considered pinmode. Pinmode we can use INPUT_PULLUP for digitalWrite only know I am not sure about analogWrite, i ididnt get it in analogWrite. If u have any idea about analog pins for internal pull up resistor let me know

Pinmode we can use INPUT_PULLUP for digitalWrite only know

INPUT_PULLUp Relates to input as its name suggests

If u have any idea about analog pins for internal pull up resistor let me know

You can use INPUT_PULLUP on analogue pins when they are being used as digital pins as I assume they will be when used with I2C

The internal pullups may not be strong enough for reliable I2C communication. In that case external resistors are required.

But most I2C breakouts already have 10k pull-ups on them - have you checked?