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 ? | 70 Yes | 17 No |
Post New Answer View All Answers
Are enumerations really portable?
What is a program flowchart and how does it help in writing a program?
How can I swap two values without using a temporary?
What is difference between structure and union in c?
Is c is a middle level language?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
How can you read a directory in a C program?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
Explain what is the benefit of using an enum rather than a #define constant?
What is c mainly used for?
What are qualifiers in c?
Is there a built-in function in C that can be used for sorting data?
How many types of operators are there in c?
What is the newline escape sequence?
Why cant I open a file by its explicit path?