Grusom variabel Type type void value void ting switch type case CHAR t

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Grusom* variabel(Type type, void* value)
{
void* ting;
switch (type)
{
case CHAR:
ting = malloc(sizeof(char));
*(char*)ting = *(char*)value;
break;
case INT: