Answers for "memset c"

8

memset

/* memset example */
#include <stdio.h>
#include <string.h>

int main ()
{
  char str[] = "almost every programmer should know memset!";
  memset (str,'-',6);
  puts (str);
  return 0;
}

// Output:
// ------ every programmer should know memset!
Posted by: Guest on June-19-2020
2

memset c

#include <stdio.h>
#include <string.h>

int main () {
   char str[50];

   strcpy(str,"This is string.h library function");
   puts(str);

   memset(str,'$',7);
   puts(str);
   
   return(0);
}
Posted by: Guest on December-04-2020
1

memset c

void *memset(void *str, int c, size_t n)
Posted by: Guest on December-04-2020
1

memset

// memset syntax
void * memset ( void * ptr, int value, size_t num );
Posted by: Guest on June-19-2020
0

memset c

This is string.h library function
$$$$$$$ string.h library function
Posted by: Guest on December-04-2020

Browse Popular Code Answers by Language