count consequtive character in the char array Programming Software Development by borchu Hello, I have a problem about counting consequtive characters, here my code char query[] = "tttthe oneZZZZZ trully …;tttthe oneZZZZZ trully loveeee"; I success in counting the consequtive characters, but it counts minus 1, for example there are… Re: count consequtive character in the char array Programming Software Development by mrnutty You need to start k at 1. Re: Please I need help formatting an output file and sorting the names! Programming Software Development by freemind … check it's length and save it as a temporary. Consequtive checks can give you the size of the longest name… Re: help please Programming Software Development by d1e9v85 but still that program does not alphabetize the names! all it does is compares two consequtive names. Re: help please Programming Software Development by iamthwee [QUOTE=d1e9v85;284289]but still that program does not alphabetize the names! all it does is compares two consequtive names.[/QUOTE] Hints: 1. Use a nested for loop. I.e a for loop within itself 2. Find out what strcmp returns. 3. How do you swap elements of the array. Do you need to create a temporary variable? Re: type error Programming Software Development by Inshu if I cannot write x{i] what should i do to take difference between two consequtive points in my loop which are {x, y,z} and {x+i, y+i, z+i} and yes u r write my main is useless yet.. m trying to make a nested loop for taking a point in main nd calculating distance using another point in main .. m so confused..