How do I use NACK's and ACK in I2C using the Wire.h library

Hello

I am trying to read data from a particular register in my bq27510 Li-ion Fual Gauge (example here register 0x2C for State Of Charge) in the datasheet the ideal read I2C sequence should look like:

Start, 0xAA, [Ack], 0x2C, [Ack], Repeated Start, 0xAB, [Ack], Data Read, [Nack], Stop

0xAA = Fual Gauge Write, 0xAB = Fual Gauge read, 0x2c = SOC reg, Ack= Acknowledge, Nack= No Acknowledge.
Technically the I2C address of bq27510 in 7 bit format is 0x55 so when you add the write/read bit then you get in 8 bit format 0xAA and 0xAB respectively.

what lines of code will give me the Ack and Nack functions ? Are they alreadly in the Wire.h library

Are you sure the ACK & NACK are not the device responding with the 9th bit of the I2C protocal?

Generally ACK and NACK are all handled by the I2C drivers, you have no need to specifically do anything about them.

Look at the I2C examples in the arduino IDE for examples of how to talk to an I2C device.