Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
app1
2.1 Comparision of Matrix Transpose Execution Time
es collar
MATRIZ DE CADENAS
lambda
summing long int
ACCES FUNC
TruncatablePrime
String Manipulation
funciones serie de taylor
Please log in to post a comment.