+ 3

Why are we get output x when run our program? [our program is char c=120; printf("%c",c);]

18th Apr 2020, 5:59 PM
Rudra
Rudra - avatar
3 odpowiedzi
+ 1
if you look at the ASCII table to the number 120 in google, you will find out that x has the number 120. In your printf() you are formating "%" a char "c" by its ASCII number "120". So printf("%c", c) means, format the number 120 to its ASCII order.
18th Apr 2020, 8:19 PM
William M
William M - avatar
+ 3
William M! Thank You So Much Bro! I Got it.
19th Apr 2020, 12:16 PM
Rudra
Rudra - avatar
+ 1
No problem you are welcome any time!
19th Apr 2020, 1:39 PM
William M
William M - avatar