+ 3
What is the problem in this program
6 Answers
+ 3
the 13 line must be moved inside the loop block to allocate new memory each iteration
also this instruction "temp = temp->rptr" should be removed in line 55
https://code.sololearn.com/cwBQV8TC9lED/#c
+ 2
Tq ,bro
But without temp the left is moves to other location so the left is changed
We can't change the left
We just printing the values
+ 1
https://code.sololearn.com/ci92YC4I8eiX/?ref=app
Tq moved elomari,
For
Ur clu
+ 1
arguments are always passed to functions by value in C. in other words, when C passes control to a function, a copy of each argument is made and this copy is passed to the function - leaving the original variable unchanged. so if we change "left" of printl() to point something else then "left" of main() remains unaffected.
in order to amend a variable in a calling function from within a called function, you need to pass a pointer to the variable as a function argument. this provides the called function with the memory address of the variable to be amended. dereferencing this (pointer) variable within the called function provides access to the original value:
https://code.sololearn.com/cVu8SlIlU9a2/#c
+ 1
Tq
0
hello