InterviewSolution
Saved Bookmarks
| 1. |
Is It Possible To Initialize A Variable At The Time It Was Declared? |
|
Answer» Yes, you don’t have to write a separate assignment statement after the variable declaration, unless you PLAN to change it later on. For EXAMPLE: CHAR PLANET [15] = “Earth”; does two things: it declared a string variable named planet, and then initialize it with the value “Earth”. Yes, you don’t have to write a separate assignment statement after the variable declaration, unless you plan to change it later on. For example: char planet [15] = “Earth”; does two things: it declared a string variable named planet, and then initialize it with the value “Earth”. |
|