Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

ternary operator

i am having trouble understanding this statement using a ternary operator found in the partition method of the quicksort alg. what is the longer equivalent of this statement (not using ternary operator)?


Code
i = (i == NULL) ? l : i->next;

thanks in advance.
Code
if (i == NULL) i = l;
else i = i->next;
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by lockheadApr 22, 2021 07:10 AM 0 146 Apr 22, 2021 07:10 AM
Last Post: lockhead
[C] by pmsSep 29, 2019 05:30 AM 1 250 Sep 29, 2019 05:30 AM
Last Post: YouthInAsia
[C] by F.A.S.TMar 8, 2019 12:38 PM 9 484 Mar 8, 2019 12:38 PM
Last Post: F.A.S.T