Hello @kartik,
Follow these steps to reset password in Windows system
- 
Stop Mysql service from task manager 
- 
Create a text file and paste the below statement 
         MySQL 5.7.5 and earlier:
         SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yournewpassword');
         MySQL 5.7.6 and later:
         ALTER USER 'root'@'localhost' IDENTIFIED BY 'yournewpassword';
          3.Save as mysql-init.txt and place it in 'C' drive.
           4.Open command prompt and paste the following
            C:\> mysqld --init-file=C:\\mysql-init.txt
Hope it helps!!!
Thank you!!