main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / raj
answer is :1 2 2 ;
size('3')means character constant so it is short int size it
will ocupi 1.
size("3")it will treated as string. 2
size(3) it is integer 2
| Is This Answer Correct ? | 9 Yes | 19 No |
Post New Answer View All Answers
Why & is used in c?
Explain what are linked list?
Differentiate between the expression “++a” and “a++”?
What is stack in c?
What is the deal on sprintf_s return value?
What are Macros? What are its advantages and disadvantages?
What are the general description for loop statement and available loop types in c?
What is difference between arrays and pointers?
What are the application of void data type in c?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
What is 2 d array in c?
What is difference between union All statement and Union?
Explain what is the difference between #include and #include 'file' ?
What are the uses of null pointers?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....