nRF24L01 - leaves out end characters during transmission This is my Master's code.

#include &lt;nRF24L01.h&gt;
#include &lt;RF24.h&gt;
#include &lt;RF24_config.h&gt;
#include &lt;SPI.h&gt;

RF24 radio(7, 8);

const byte address[6] = "00001";
char text[20] = "";
int flag;
char *p;
int i;

void print();
void read();
void rfwrite();
void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setDataRate(RF24_1MBPS);
  radio.setChannel(1);
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();

  flag = 0;
  p = text;
}

void loop() {


  if (Serial.available()) {
    read();

  }
  if (flag) {
    print();
    rfwrite();

  }


}

void print() {
  Serial.println(text);
  flag = 0;
}

void read() {
  p = &amp;text[0];
  for (i = 0; Serial.available(); p++, i++) {
    *p = Serial.read();
  }
  text[i + 1] = '\0';
  flag = 1;
}

void rfwrite() {

  radio.startWrite(text, strlen(text)+1);


}


Slave code:

#include &lt;nRF24L01.h&gt;
#include &lt;RF24.h&gt;
#include &lt;RF24_config.h&gt;
#include &lt;SPI.h&gt;

RF24 radio(7, 8); //ce,csn

const byte address[6] = "00001";
char text[20] = "";
int  i;

void write_to_array();
void print();
void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setDataRate(RF24_1MBPS);
  radio.setChannel(1);
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
}

void loop() {
  while (radio.available()) {

    write_to_array();
    print();

  }


}

void write_to_array() {
  radio.read(text, strlen(text)+1);

}


void print() {
  Serial.println(text);

}


I edited the code and made it with an array like @Kwasmich said. But now some end characters are not getting printed. When I type 1234567890-= into the transmitter, only 1234567890- gets printed. When I type a new set of characters following that, the missing = gets printed. Also, this happens only on the second transmission after I upload the code to the Arduino. The first set of characters are received and printed correctly. How do I fix this? Will flushing the buffer help(I doubt this because the first transmission is received correctly)?
This is not a proper solution explaining why the issue occurred in the first place but merely a workaround to anyone encountering the same problem.

There is another function in the RF24 library called startWriting(). The description in the library was not clear about the differences between this and write(). But I noticed that the last character was missing with the use of startWriting(). So I simply changed

radio.read(&amp;text, sizeof(text));


in the master to 

 radio.read(&amp;text, sizeof(text+1));


and voila!
The code now does its intended purpose!!