0

Hi i know this may sound a bit silly but i have looked through some websites but can't really find exactly what the difference is between "=" and "=="

For example

if(x==0) execl(“/bin/ps”, “ps”,”-eal”,NULL)

how is that different from

if(x=0) execl(“/bin/ps”, “ps”,”-eal”,NULL)

thanks

2
Contributors
2
Replies
7
Views
7 Years
Discussion Span
Last Post by bryann
0

'=' is an assignment operator
'==' is a comparison operator

do you want to assign a value
or compare two values

0

'=' is an assignment operator
'==' is a comparison operator

do you want to assign a value
or compare two values

ah thank you i totally understand now. Don't know why i didnt before

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.