[ create a new paste ] login | about

Link: http://codepad.org/2ezjFCNy    [ raw code | output | fork ]

appunti2 - C, pasted on May 1:
#include <stdio.h>

struct Arguments {
    char x;
    int  max;
};

void *
function (void *arguments)
{
    struct Arguments *arg = (struct Arguments *) arguments;
    long int i;
    for (i = 0; i < arg->max; i++)
      {
        printf ("%c", arg->x);
      }
    return NULL;
}

int
main (void)
{
    struct Arguments arg = {'x', 10};
    function (&arg);
    printf ("\n");
    return (0);
}


Output:
1
xxxxxxxxxx


Create a new paste based on this one


Comments: