Questions tagged [string.h]

A header file from the C standard library that defines various functions for interacting with C strings.

In C a string is a null-terminated set of contiguous char values, often referred to via a pointer. The string.h header defines many common methods for interacting with such strings. These methods are guaranteed to be portable as a part of the standard library, but may have other limitations or security concerns.

138 questions
-4
votes
2 answers

Do you have a simple bzero example?

I need to implement bzero, I've read the manual, I saw a lot of posts about it on StackOverflow, but what I'm asking for is a simple example where you use bzero, I didn't find any simple example of using bzero instead of using it in server/client in…
user3540997
  • 39
  • 1
  • 1
  • 9
-5
votes
2 answers

strlen doesn't work even with #include in C

Does it not return an int or something? This is a snippet of my code: int wordlength(char *x); int main() { char word; printf("Enter a word: \n"); scanf("%c \n", &word); printf("Word Length: %d", wordlength(word)); return…
Evyione
  • 31
  • 2
  • 10
-9
votes
1 answer

windows memory formatting issue

I am trying to make this dynamic reallocation work in a portable fashion. My program accepts a line of text from a user and appends it to a buffer. If the length of text in the buffer is 20 or more, it removes the first 20 characters and moves…
1 2 3
9
10