shell logical and for file existence

C++
#!/bin/bash
if [ -e x.txt ]
then
    echo "ok"
else
    echo "nok"
fiFILE=/etc/resolv.conf
if [ -f "$FILE" ]; then
    echo "$FILE exists."
else 
    echo "$FILE does not exist."
fi
if [[ -f $FILE1 ]] && [[ -f $FILE2 ]]; then
    echo "OK"
fi
Source

Also in C++: