GIAC
GSSP-.NET · Question #485
(Topic 4) You work as a Software Developer for ManSoft Inc. You create an application using Visual Studio .NET 2005. You write the following code snippet in the application: int amt = 50; String s =…
The correct answer is B. "John gave me 50 dollars". See the full explanation below for the reasoning.
Question
- (Topic 4) You work as a Software Developer for ManSoft Inc. You create an application using Visual Studio .NET 2005. You write the following code snippet in the application: int amt = 50; String s = "John gave me " + amt + " dollars"; Console.WriteLine(s); What will be the output of the above code?
Options
- A"John gave me amt dollars"
- B"John gave me 50 dollars"
- CInteger variable cannot concatenate with the string
- DInvalid type cast exception
How the community answered
(16 responses)- A6% (1)
- B75% (12)
- C13% (2)
- D6% (1)
Community Discussion
No community discussion yet for this question.