Units digit of 4^1= 4 , Units digit of 4^2 =6 , Units digit of 4^3 is 4 and Units digit of 4^4 is 6(follows pattern 4,6,4,6,4,6…..)
Hence for 4^x , if(x%2==0 && x) ans =6 ; else if(x%2) ans =4; else ans=1;
So for 2^100 which is 4^50 the units digit(ans) is 6