🔥 Let's talk about mistakes! 🔥 Check the code below and give your answer! *** C-CODE *** #include <stdio.h> #include <stdlib.h> typedef struct block_chain_link{ float send; float receive; struct block_chain_link* next_link; } block_chain_link; int main() { block_chain_link* new_link; block_chain_link* ptr = NULL; float amount = 5.321652; // first block new_link = (block_chain_link*)malloc(sizeof(block_chain_link)); new_link->send = amount; new_link->receive = 0; new_link->next_link = ptr; ptr = new_link; // second block new_link = (block_chain_link*)malloc(sizeof(block_chain_link)); new_link->send = 0; new_link->receive = amount-1; new_link->next_link = ptr; ptr = new_link; printf("Block 2: receiver received of %f token amount\n", ptr->receive); ptr = ptr->next_link; printf("Block 1: sender sent of %f token amount", ptr->send); return 0; }
- 0 replies
- 2 recasts
- 0 reactions
ANYKEYMAN - young and inexperienced employee whose responsibilities include some knowledge of basic system administration and counseling inexperienced PC users 🤦🏼♂️ Is this really your maximum?! Go and Learn programming and math! 🚀
- 0 replies
- 0 recasts
- 0 reactions
https://warpcast.com/antohin/0x374aa1b4
- 0 replies
- 1 recast
- 0 reactions