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


Please Help Members By Posting Answers For Below Questions

Are enumerations really portable?

598


What is a program flowchart and how does it help in writing a program?

669


How can I swap two values without using a temporary?

621


What is difference between structure and union in c?

551


Is c is a middle level language?

600






the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

652


How can you read a directory in a C program?

655


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.

2654


Explain what is the benefit of using an enum rather than a #define constant?

728


What is c mainly used for?

601


What are qualifiers in c?

574


Is there a built-in function in C that can be used for sorting data?

749


How many types of operators are there in c?

621


What is the newline escape sequence?

591


Why cant I open a file by its explicit path?

595