main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / k.thanigaivel
This output is
4 2 4
Explanation:
sizeof('1 or 2 or 3,......or n')=4
sizeof("0")=2
sizeof("10")=3
sizeof("100")=4
sizeof("1000")=5
sizeof("10000")=6
.
.
.
.
.
sizeof("n")=n
sizeof(1 or 2 or 3......or n)=4
| Is This Answer Correct ? | 27 Yes | 25 No |
Post New Answer View All Answers
What are the 4 types of functions?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What are keywords in c with examples?
What is New modifiers?
How do you convert strings to numbers in C?
What is the difference between array and pointer in c?
What is modifier & how many types of modifiers available in c?
What is wrong with this program statement? void = 10;
What is assert and when would I use it?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
What is c language used for?
What is a double c?
What are the 4 types of unions?
Why we use int main and void main?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?