last day (15 days later) » 

11:14 AM
1
A: What am I doing wrong that its not inserting the node at the beginning of the list

Mehul MittalinsertBeg returns a node, which is supposed to be new header of the list you have to accept that return type and set it as new header like the following: int main(int argc, char **argv) { struct node * newHeader; init = createLinkedList(1); insertEnd(init, 6); newHeader = insert...

 
your solution ain't working
 
can I see the error
 
where exactly is the error
 
Both of your solutions are not working
 
11:14 AM
@droid can you shate what exactly are you doing!
@droid we can discuss it here in detail
 
The solution looked fine to me, there might be some other issue interfering now.
 
he might be facing issues on his machine, lets see what exactly is he facing
 
I want to insert a node at the beginning of a linked list
@TanveerBadar may be
 
that is exactly what the code is doing, what issue are you facing!
as I can see
your code has 3 major parts
one creates list
one adds to last of list
and one adds to begining
are you able to run the code
you there
 
Thanks pals it seems its the VS code terminal issues, when I ran it in iterm2 the solution works perfectly. thanks again
 
11:26 AM
anytime
 

last day (15 days later) »