Hello Aishwarya,
I appreciate your interest towards artificial intelligence and I'm here to help you regarding your query!!
So, basically learning artificial intelligence is completely based on your interest. And, anybody can learn it regardless of departments. The mains thing you should have is to exell in programming and mathematics and also complex systems. So, only your interest will take you further and you can study artificial intelligence though you take either computer science or Electronics and Communication. Be patient and do research so that you can choose the best one !!
Hope this helps !!
All the very best !!
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile