I am new to networking. I have a small confusion. Can two pc be connected directly using straight through cable without any router or switch?
Yes. But with a crossover cable. That's easy to figure out yourself. You may have questions about the firewalls and configs.
The answer is, "It depends." If the ethernet ports on one or both of the PCs support Auto MDI/MDIX, then the answer is, "Yes," otherwise, the answer is, "No."
Most modern PCs have ethernet ports which support Auto MDI/MDIX, so the answer is probably, "Yes," but you need to double check your equipment.