memset(),memory set,memset() function, memory set
function,memset() in C,memory set in C,program to memory set
function,program to memset() function,Write a program to memory set
memset() function in C language,memset() in c language
memset() function
To set all bytes in a block to a particular value,by use memset() function.
Syntax
void *memset(void destination,int set_value,size_t count);
Program
#include<stdio.h>
char a[100] = "God gift programming";
main()
{
memset(a+2,'*',10);
printf("After memset : %s\n",a);
}
Output
After memset : Go**********gramming
In this case,from a[2] position to 10 positions are overlapped with *.i.e. memset().
memset() function
To set all bytes in a block to a particular value,by use memset() function.
Syntax
void *memset(void destination,int set_value,size_t count);
Program
#include<stdio.h>
char a[100] = "God gift programming";
main()
{
memset(a+2,'*',10);
printf("After memset : %s\n",a);
}
Output
After memset : Go**********gramming
In this case,from a[2] position to 10 positions are overlapped with *.i.e. memset().
programming example codes about c language
ReplyDeletegetting disk status c code sample