Why is the first address in a subnet reserved as the network address and the last as the broadcast address?

Reserving the first address as network allows easy identification of the network, and the last address as broadcast is used to broadcast common messages to all devices in the network

Can a public IP be assigned directly to a laptop in an office network? What are the risks?

It can be assinged. but it is highly not recommended, because it is prone to easy data theft, access and spamming.

What is the difference between class A, B, and C networks in subnetting?

Class A: can accommodate very large number of devices in a network
Class B: can accommodate medium size networks
Class C: can accommodate small network's devices

What is the purpose of a subnet mask?

It helps identify which part of IP address is network ID and host ID

What is the difference between a network ID and a host ID?

Network ID identifies the network the IP address belongs to, Host ID identifies the device within that network