C# Programming - Datatypes - Discussion
Discussion Forum : Datatypes - General Questions (Q.No. 14)
14.
Which of the following are the correct way to initialise the variables i and j to a value 10 each?
int i = 10; int j = 10;
int i, j; i = 10 : j = 10;
int i = 10, j = 10;
int i, j = 10;
int i = j = 10;
Discussion:
2 comments Page 1 of 1.
Meghu said:
1 decade ago
Any one can explain this question in detail?
Nisha said:
10 years ago
2nd option is using the colon in between of initializing.
4th option is declare the value 10 only for j variable.
5th option is wrong initializing method.
4th option is declare the value 10 only for j variable.
5th option is wrong initializing method.
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers