Does malloc assign memory in the same location if you use the same variable name again on every iteration of a loop?
I am writing code to take in a weighted adjacency list in c. Each edge is stored in the form of a struct. I created a an array of pointers where each pointer leads to the list for a node. Here’s what I did: #include<stdio.h> #include<stdlib.h> struct edge{ int u; int v; int w; };