New to Arduino

What is the difference between digitalWrite and digitalRead

Don't you know the meaning of the verb to write and the verb to read?

Look at the top of this page under “Resources” and click the reference area. It’s all explained there.

SankalpaSri119:
What is the difference between digitalWrite and digitalRead

In the context of Arduino UNO Programming, the referred words are:

digitalWrite()
digitalRead()

==> digitalWrite(DPin, booleanValue); //puts HIGH (5V) or LOW (0V) on any DPin (Fig-1)
==> bool n = DigitalRead(DPin);         //reads logic level of any DPin and stores it variable n

DPin (digital pin) refers to any pin ( 0 to 19) at the edge connector of Arduino UNO (Fig-1).
50lxy.png
Figure-1:

Examples:
1. Execution of the following code will ignite LED1. (Assumption: the direction of PB0 is output.)

digitalWrite(8, HIGH);

2. The execution of the following code will store the closed condition (HIGH) of button K1 into variable n.(assumption: the direction of PINC0) line is input.)

bool n = digitalRead(A0);

50lxy.png