edited by
392 views
1 votes
1 votes
What is the difference(reason for different outputs) between the following statements?

printf("%d",'A');

printf("%d", "A");

printf("%c",'A');

printf("%c", "A");

(p.s.: a character between single quotes represents an integer value equal to the numerical value of the character in machine's character set. but what about the double quotes?)
edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
SSR17 asked Feb 29
204 views
#include <stdio.h int main() { int i = -1; int x = (unsigned char)i; printf("%d", x); return 0; }output is 255 , but please explain how
2 votes
2 votes
3 answers
2
Laahithyaa VS asked Sep 9, 2023
895 views
. What will be the value returned by the following function, when it is called with 11?recur (int num){if ((num / 2)! = 0 ) return (recur (num/2) *10+num%2);else return 1...
2 votes
2 votes
1 answer
3
rupamsardar asked Aug 30, 2023
468 views
#include <stdio.h int f(int x) { if(x%2==0) { return f(f(x-1)); } else return (x++); } int main() { printf("%d",f(12)); ret...
3 votes
3 votes
5 answers
4
arpit.bagri asked Aug 6, 2023
1,043 views
Why is the output of the below program 36? int main(){ int a = 1; int b = ++a * ++a * ++a; printf("%d", b ); ​​​​ return 0; }