Is it possible to do a phd in computer science with an undergraduate degree in electrical engineering? Is it possible to get admitted in a phd in computer science with an undergraduate degree in electrical engineering? If the answer is yes, then would a graduate student in theoretical computer science who has an undergraduate degree in electrical engineering experience difficulty understanding the computer science?
This is definitely possible, but the question how much remedial or independent study will you need?

If you're in Theoretical computer science, you will need a good handle on:


Algorithms and Data Structures
Discrete math
Induction and formal logic
Graph Theory
Formal languages
Complexity theory (P vs NP, etc.)
Computability and the Halting Problem
Reductions, both for computability and complexity


In addition, you will probably be expected to be able to program fairly well and fairly cleanly, to not be tied to specific programming languages, and use tools like version control and shell scripting. My experience is that engineers are usually able to pick up CS content pretty fast, but often write messy code, and often are uncomfortable in Languages other than C 

Some of this you may be able to learn in your program, as some countries have courses as a part of their PhD programs. But some you may need to study on your own.