main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / ashwin
4 2 4
sizeof('3') means it will take ascii value which is an
integer, it shows size of integer.
sizeof("3") means, here it will treat it as an array, it
will print size of an array, so array contain '3' and '\0'
so out put is 2.
try size("3ashwin") it will give 8 as out put.
sizeof(3) means directly we asking size of an integer.
thank you
if is an wrong answer plz write correct answer to
molugu.ashwin@gamil.com
| Is This Answer Correct ? | 71 Yes | 17 No |
Post New Answer View All Answers
What is wrong with this code?
What is bubble sort technique in c?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What are linker error?
What is the use of #include in c?
What do you know about the use of bit field?
Explain the array representation of a binary tree in C.
What is meant by preprocessor in c?
Can we increase size of array in c?
Explain bit masking in c?
write a program in c language to print your bio-data on the screen by using functions.
In which layer of the network datastructure format change is done
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
How can I find out if there are characters available for reading?
Is main a keyword in c?