main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / vinay kabra
Answer is : 1 2 2
because
sizeof('3')takes 3 as character and so, size of a character
is 1 byte
sizeof("3") takes 3 as a string so, here strinf contains one
character 3 and end character '\0'. so, sizeof("3") gives o/p 2
and
sizeof(3) takes 3 as integer so size of an integer is 2 bytes
| Is This Answer Correct ? | 18 Yes | 24 No |
Post New Answer View All Answers
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What is function and its example?
What is the equivalent code of the following statement in WHILE LOOP format?
What are the features of c languages?
What is a double c?
What is the value of h?
The statement, int(*x[]) () what does in indicate?
What is the purpose of ftell?
What is d'n in c?
Explain what does the function toupper() do?
Can we declare function inside main?
Here is a neat trick for checking whether two strings are equal
Why clrscr is used in c?
Explain what are its uses in c programming?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.