regarding this code:
Code:
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct { int x; char *y; } odradek;
odradek Example (int x, char *y) {
odradek a_odek;
a_odek.x=x;
a_odek.y=malloc(strlen(y)+1);
strcpy(a_odek.y, y);
return a_odek;
}
int main() {
int x=10;
char this[]="that would be";
odradek example=Example(x,this);
printf("%d: %s\n",example.x,example.y);
free(example.y);
}
i know that variable "this" is of type orbarek
but in order to assign values to "this" (in java i used a costructor)
where is it in this code?