Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
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.
more_than_one_break_in_loop
a.out
MATRIZ DE CADENAS
ponyerb orange panther
funciones serie de taylor
swipe the numbers in cyclic way
Assignment 8
B_141128_MatrizProducto
Eee
Spring 2017 Lab 4 v0.5
Please log in to post a comment.