Jump to content

Trabalhar com Memória , crash


Go to solution Solved by HappyHippyHippo,

Recommended Posts

 #include <stdio.h>
 char * memset2 (char v[],char ch, int n);

 int main()
    char *v = "PaP Programar";
    char ch = 'A';
    int n = 3; 
    printf("A string alterada é: %s \n",memset2(v,ch,n));

 char * memset2 (char v[],char ch, int n)
        int i;
        for (i=0; i<n;i++)
            v[i] = ch;
        return v;

output: http://prntscr.com/or6w63

Boa tarde Caríssimos  🙂,

o programa que estou a trabalhar crasha e não sei como resolver.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.