Question: C code can't get right ans. #include #include // remove non alphbet characters void strPK(char* src, char* dst)/*{{{*/ { int index = 0; for (int

C code

can't get right ans.

#include #include

// remove non alphbet characters void strPK(char* src, char* dst)/*{{{*/ { int index = 0; for (int i = 0; ; ++i) { if (src[i] == '\0') break; if (!((src[i] >= 'A' && src[i] = 'a' && src[i] temp2[i]) return 1; else if (temp1[i]

int main()/*{{{*/ { char str1[100]; char str2[100]; printf("first string : "); fgets(str1, 100, stdin);

printf("second string : "); fgets(str2, 100, stdin);

int result = strCmpPk(str1, str2); if (result) printf("string1 > string2 "); else if (result == -1) printf("string1

return 0; } /*}}}*/

 C code can't get right ans. #include #include // remove non

gr3201500520cspro: /temp ./a. out first string cpro!!!gramming!! second string cprogramming stringlstring2 gr 320150052@cspro: /temp$ ./a.out first string abcde second string : aacde string string2 gr 3201500520cspro: /temp$ ./a.out first string!!abcd second string abcd stringstring2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!