Driver code
public static void Main ( String [ ] args ) { String [ ] arr = { " geeksforgeeks " , " geeks " , " geek " , " geezer " } ; int n = arr . Length ; String ans = commonPrefix ( arr , n ) ; if ( ans . Length > 0 ) { Console . WriteLine ( " The ▁ longest ▁ common ▁ prefix ▁ is ▁ " + ans ) ; } else { Console . WriteLine ( " There ▁ is ▁ no ▁ common ▁ prefix " ) ; } } }