I wanted to know how cookie stored for each website? How they identify thei cookie?

It's up to the browser, of course, but typically they're organized by domain. Put simply, a website's domain is know, so it's trivial to match the website with its cookies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.