No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Folks, here is an implementation of memset(), however I have been told that there is one logical mistake in the code. Could you help me find it. I feel that a double pointer for the target string should be passed to this function, which will be like passing the address … |
|
Folks, I know we can use unsigned/signed int and char to define our own Boolean type in C. We can either use 0 or 1 to distinguish FALSE or TRUE or use TRUE as anything which is non-zero. Why can't I use float data type to define my own boolean … |
|
Folks, I have been told that there is one logical problem with this code. Basically, this is an implementation of the library function strcat(). The intended beahviour of this function to concatenate ct to the end of s. Return s. I could not find any logical problems with the code, … |
|
Hi Guys, First post here, so be gentle :-) I was going looking for an implementation of memcmp(), I found this code snippet, but it is clearly marked that there is 1 logical error with the code snippet. Could you help me find the logical error. Basically, I tested this … |
|
The definition of library function strspn is: [CODE]size_t strspn(const char *str, const char *chars) /*Return number of leading characters at the beginning of the string str which are all members of string chars.*/[/CODE] e.g. if ‘str’ is “fecxdy” and ‘chars’ is “abcdef” then the function would return 3, since ‘f’, … |