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

Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

0 Answers  


What is a private class in c#?

0 Answers  


What is difference between property and variable in c#?

0 Answers  


What is list array in c#?

0 Answers  


What is a string c#?

0 Answers  






What does the keyword “virtual” declare for a method or property?

0 Answers   Siebel,


i want o/p 011242110 in c# code.

0 Answers   TCS,


What is streamreader/streamwriter class?

0 Answers  


Why do we need dependency injection in c#?

0 Answers  


What?s the difference between an interface and abstract class?

4 Answers  


What is gac? What are the steps to create an assembly and add it to the gac?

0 Answers  


what is the purpose of interface in c#.net

6 Answers  


Categories