0

What is the output this C code ?

#include<stdio.h> int main() { char c=250; c=c+10; printf("%d",c); return 0; }

27th May 2021, 7:08 AM
Sai Krishna
Sai Krishna - avatar
1 Resposta
+ 3
the output is 4.There are total 256 ASCII values. First c has the symbol with ASCII value 250,then when you add 10 and reach 255, the counter restarts from 0, and reaches the ASCII symbol with decimal value 4.
27th May 2021, 7:16 AM
Mihail
Mihail - avatar