☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> Basic C Question
Add Reply
New Topic
New Poll
Views: 457
Replies: 2
Track Topic
Coach94
Member
Posts: 18,413
Joined: Sep 18 2005
Gold
:
4,827.00
#1
Oct 4 2015 10:01pm
I have this review question that I am not sure about and was wondering if anyone would be able to give me some insight..
The question is ..
Is the expression on the second line legal? Why or why not? What does it mean?
int x;
... &&x ...
My guess would be that it isn't legal because x is not a pointer of any sort you would use & to obtain the address of x if you were to use & at all?
Thanks
carteblanche
Member
Posts: 32,925
Joined: Jul 23 2006
Gold
:
3,804.50
#2
Oct 4 2015 10:32pm
sounds like a great example you can put into a compiler to see the result.
are you sure && is for pointers and not the logical AND operator?
Eep
Member
Posts: 23,862
Joined: Aug 16 2006
Gold
:
20.00
#3
Oct 5 2015 05:04pm
did he really type a bunch of dots, &&x, then more dots? what a dick
not that I think it changes much. IIRC in C, 0 is false, all other values equate to true
Go Back To
Programming & Development
Topic List
Add Reply
New Topic
New Poll
© 2003-2026 d2jsp
Contact