int a = '3' + '4';
char n = (char)a;
What will be answer of n?

Answers were Sorted based on User's Feedback



int a = '3' + '4'; char n = (char)a; What will be answer of n?..

Answer / lourdhu raja. d

value of n = 'g'
Value of a here is 103 ('3' = 51; '4' = 52)
so (char)a = 'g'

Is This Answer Correct ?    21 Yes 0 No

int a = '3' + '4'; char n = (char)a; What will be answer of n?..

Answer / vinay

103'g'

Is This Answer Correct ?    17 Yes 5 No

int a = '3' + '4'; char n = (char)a; What will be answer of n?..

Answer / shadab

Answer -> 'g'

Is This Answer Correct ?    2 Yes 1 No

int a = '3' + '4'; char n = (char)a; What will be answer of n?..

Answer / amol more

Hey Hi Guys, we will get the error like below,

Error: Too many characters in character literal

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More C Sharp Interview Questions

How do you inherit from a class in C#?

3 Answers   Visual Soft,


If u declare two interfaces withsame methodnmae .prototype how can u call the particular method from class?

4 Answers   Microsoft,


How can we give strong name to assembly? What is satellite assembly?

2 Answers   SMNetserv,


what's the Difference between DataView and DataTable?

10 Answers  


What are types of constructor?

1 Answers  


What is use of a HashTable in .NET?

1 Answers   Arigo Infotech,


Can we inherit private members of class in c#?

1 Answers  


What are console applications used for?

1 Answers  


What is base class in c#?

1 Answers  


What are synchronous and asynchronous operations?

1 Answers  


What are assemblies?

1 Answers   Microsoft,


What is generic collection in c#?

1 Answers  


Categories