main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
Answer Posted / manjulatha
'3' is a character so it take 1 byte
"3" is a string containing 2 characters 3 and \0 so it takes
2bytes
3 is a integer and it takes 4 bytes
so answer is 1 2 4
| Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
What is malloc() function?
What is meant by type casting?
program to convert a integer to string in c language'
Can the size of an array be declared at runtime?
If errno contains a nonzero number, is there an error?
What are the two types of structure?
What is the use of ?
How are pointers declared in c?
Can we compile a program without main() function?
What is structure packing in c?
What does *p++ do? What does it point to?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is bubble sort technique in c?
What is a protocol in c?
What is zero based addressing?