C# Programming - Control Instructions - Discussion
Discussion Forum : Control Instructions - General Questions (Q.No. 3)
3.
Which of the following statements is correct?
Discussion:
2 comments Page 1 of 1.
Vimala said:
1 decade ago
The if statement will evaluate for 2 options either 0 or 1, if(0) means it's true and so loop will execute or els it wont.
Raj said:
1 decade ago
Nonzero means true and zero means false.
In C & C++ you can write an integer expression and the compiler will silently convert the integer value to true(nonzero) or false (zero). But C# does not support this behavior.
In C & C++ you can write an integer expression and the compiler will silently convert the integer value to true(nonzero) or false (zero). But C# does not support this behavior.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers