Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PointerFunct
#include "stdio.h" void bark(int a) { printf("I am a dog and I bark %d times",a); } void miau(int a) { printf("I am a cat and i miau %d times",a); } typedef struct { void (*talk)(int); }animal; int main(void) { animal dog; dog.talk = &bark; animal cat; cat.talk = &miau; cat.talk(2); animal pets[2]; pets[0] = dog; pets[1] = cat; int i; for(i=0; i<2; i++) pets[i].talk(2); return 1; }
run
|
edit
|
history
|
help
0
Quadratic Formula
Project 4 v.6
c. new one
-Shello.c
Función quicksort decreciente
UserDefinedDataType_pointer1
A_141121_fibonacci
20171117_FUNCIONES
abc.c
4