Wednesday, July 3, 2019

memset example in c program

// C program to demonstrate working of memset()
#include <stdio.h>
#include <string.h>

int main()
{
    char str[50] = "GeeksForGeeks is for programming geeks.";
    printf("\nBefore memset(): %s\n", str);

    // Fill 8 characters starting from str[13] with '.'
    memset(str + 13, '*', 8*sizeof(char));

    printf("After memset():  %s", str);
    return 0;
}




https://drive.google.com/file/d/1xYaDVv94E0CW72A67l5umgmtn1NDT5J2/view?usp=sharing

No comments:

Post a Comment

python class topic video