user45849: while (client.connected()) {
  if (client.available()) {
    char c = client.read();
    Serial.write(c);

Why we require char c and what is the use of using this command Serial.write(c)

user27653: client.read() returns exactly one byte from the serial input buffer for the port connected with object client. That is why you use a char variable. The name c is not relevant.
The next line, Serial.write(c) then writes that same character to the main serial port.
The code basically reads from one serial port and writes the same data immediately to the other serial port.

45849: <pre><code>while (client.connected()) {
  if (client.available()) {
    char c = client.read();
    Serial.write(c);
</code></pre>

<p>Why we require <strong>char c</strong> and what is the use of using this command <strong>Serial.write(c)</strong></p>
 27653: <p><code>client.read()</code> returns exactly one byte from the serial input buffer for the port connected with object <code>client</code>. That is why you use a <code>char</code> variable. The name <code>c</code> is not relevant.</p>

<p>The next line, <code>Serial.write(c)</code> then writes that same character to the main serial port.</p>

<p>The code basically reads from one serial port and writes the same data immediately to the other serial port.</p>
