Computer Science, asked by AyushKalura, 7 months ago

Find the value of z int z= ’z’ +1. Please answer this question with explaination .The correct answer will be marked as the brainliest ​

Answers

Answered by yesiamin6
1

Answer:

Look here we can state the ans in two ways

1)if z is int in case of 'z' +1

Then the ans will be garbage value as by default we didn't initialize the value for z so in the computer memory some any other value(we call it as garbage) will be stored

So we can't predict that value

So the answer would be garbage value

"" HERE YOU CLEARLY MENTION THE QUOTE MARKS AS IT RESULT IN THE CHARACTER DATATYPE SO THE OBVIOUSLY ANS WILL BE CASE 2""

Case 2)if z is character in case of 'z' +1

Then the ans would be 122+1 i.e 123. As the ASCII OF THE 'z' is 122.

Explanation:

Moreover without initialize the z we can't run the program and we can't use the same variable for the two different data types as result the program will not run if you try to run.

So in that case please typecast the variable for the proper out put

HOPE IT HELPS YOU

DO FOLLOW FOR MORE ANSWERS

MARK AS BRAINLIEST

Similar questions