The Gateway to Computer Science Excellence
0 votes
86 views

 

 

 

The answer is 'd' will be printed. Can someone draw the linked list after the operations are performed. I think the second operation of the code doesn't bring in any change to the list.

 

thanks in advance

in Programming by (391 points)
edited by | 86 views
+1
Yes the 2nd operation does not make any change. It is like q->link=q=link :/

And after all the operations what i am getting is that the last node will point to the 2nd last node. Are you getting the same?
0
yes you are correct. I am also getting the same thing. I too got the answer as 'd' .

I was confused with the solution provided,

 

 

thanks :)

1 Answer

0 votes

it print d .

by Boss (35.6k points)

Related questions

+1 vote
0 answers
3
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,648 questions
56,430 answers
195,214 comments
99,931 users