main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / deepali chandra
o/p 1 2 2
sizeof('3')takes 3 as character and so, size of a character
is 1 byte
sizeof("3") takes 3 as a string so, 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 ? | 17 Yes | 22 No |
Post New Answer View All Answers
Is main is user defined function?
What are the 5 elements of structure?
What is the full form of getch?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Does c have circular shift operators?
Is c procedural or object oriented?
What is dynamic dispatch in c++?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
How will you find a duplicate number in a array without negating the nos ?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
Give the rules for variable declaration?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
Explain how does flowchart help in writing a program?
What is the difference between ++a and a++?
What is the use of clrscr?