312 views
0 votes
0 votes
#include <stdio.h>

 int main(void)
 {
 int b;
 b='100';
 printf("%c",b);

   return 0;
 }

this shows output as 0.

i didnt understand it?

1 Answer

1 votes
1 votes

This is a case of multi character constant
This will clear your doubt :)


http://www.zipcon.net/~swhite/docs/computers/languages/c_multi-char_const.html

Related questions

2 votes
2 votes
1 answer
1
rupamsardar asked Aug 30, 2023
483 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...
0 votes
0 votes
1 answer
2
SHWETAV SUMAN asked Oct 6, 2022
328 views
i have typed the following code but when i executed it the solution was not according to my expectation.unsigned short int y= -9; int iy=y; printf(“%d”,iy); solutio...
0 votes
0 votes
3 answers
3
ykrishnay asked May 30, 2022
1,059 views
int main(){extern int a = 20;printf("%d",a); }//why this gives error but followig code is not extern int a =20;int main(){printf("%d",a); } //why this happens that first ...
0 votes
0 votes
0 answers
4
ykrishnay asked May 20, 2022
383 views
What is stream in c programming ? as i read file io in c programming so thats where i read “stream” word so what stream means ? thank you