+ 2
array in c
how can check the first character of array and two character before of las t character, those are equal or not??? For example, BANGLA in this word 2nd and last character same. How can do that???
4 Réponses
+ 1
c
0
What programming language? The methods are different
0
I’m pretty bad at C, so I’ll do it in C++
std::string string = “BANGLA”;
if(string[0] == string[string.length-1]){
//will be true for bangla
std::cout << “Same Letter” << std::endl;
}
0
tnx