Predict the output of following code:
main()
{
int sum;
char ch1='a';
char ch2='b';sum=ch1+ch2; // ascii sum; sum = 97+98 = 195
printf(“%d”,sum);
}
1. Error
2. 195
3. 201
4. “ab”; Predict the output of following code:; main(); {; int sum;; char ch1='a';; char ch2='b';sum=ch1+ch2; // ascii sum; sum = 97+98 = 195; printf(“%d”,sum);; }; 1. Error; 2. 195; 3. 201; 4. “ab”
Answers
Answered by
0
it's c++..............
Similar questions