strcmp
strcmp() return values in C [duplicate]
This question already has answers here: How does strcmp() work? 开发者_开发问答(9 answers) Closed 5 years ago.[详细]
2023-04-10 12:56 分类:问答Why comparing 2 strings doesn't give desired result?
Below is the code I\'ve come up with and in all honesty tonight is my first attempt at coding at all.However I cannot seem to get my if statement to work properly.It just simply jumps to else even if[详细]
2023-04-08 18:26 分类:问答Character Pointers (allotted by new)
I wrote the following code: char *pch=new char[12]; char *f=new char[42]; char *lab=new char[20]; char *mne=new char[10];[详细]
2023-04-06 03:40 分类:问答Finding a match in an array using strcmp
im trying to compare words of an array using strcmp.Im trying to get each word that app开发者_开发技巧ears more than once in the array to print out only once, so i can determine the number of unique w[详细]
2023-04-05 10:08 分类:问答C code - Logic to remove duplicate words from a 2D char array
Hi have a C code in which I have a 2D char array as - names[100][20] //Currently maximum 100 names, each of 19 characters supported[详细]
2023-03-21 06:16 分类:问答strcmp acts weird
I have a little program which will search for some string in a file. This string have a variable part on the end and is always preceded by a byte wich tell the size.[详细]
2023-03-15 05:51 分类:问答C - Comparing numeric strings
Out of professional curiosity, what is the safest / fastest / most efficient way to compare two fully numeric strings in C?[详细]
2023-03-14 04:15 分类:问答Segfault with strcmp
I am using strcmp in following ways Passing char[] array names Passing pointers to string literals but, the second result in seg fault. even 开发者_如何转开发though i have confirmed that pointers po[详细]
2023-03-12 01:52 分类:问答strcmp for empty string
I was reviewing some code and I saw someone do a if (0 == strcmp(foo开发者_JAVA技巧,\"\")) I am curious because I think it would be faster to do a[详细]
2023-03-10 04:22 分类:问答scanf(" %[^\n]", s); then how to strcmp in C?
scanf(\" %[^\\n]\", in); then for example , i input Knock Kno开发者_如何学JAVAck and hit enter but my code block inside[详细]
2023-03-06 01:30 分类:问答