+ 1

Can somebody help me with this question.. Which of the following two statements are valid? Why? 1. x=1,024 2. x=(1,024)

27th Sep 2016, 5:47 PM
Devansh Kaushik
Devansh Kaushik - avatar
2 Respostas
+ 2
Neither, you have to remove the comma: x = 1024; If you meant to use a decimal number, use dot: x = 1.024; The statement would still be valid with useless parenthesis.
27th Sep 2016, 7:29 PM
Zen
Zen - avatar
+ 1
No, Zen.. the question is with a comma (no decimal), and the answer is the second one. But Why?
28th Sep 2016, 5:23 AM
Devansh Kaushik
Devansh Kaushik - avatar