main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / niru
2 2 2
it returns the size of the int.
if the compiler is 32bit, size of the int=4
o/p: 4 4 4
For example:
void main()
{
long int i;
clrscr();
printf("%d %d %d \n",sizeof(i),sizeof("3"),sizeof(3));
getch();
}
output:4 2 2
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
What is an endless loop?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
List some of the static data structures in C?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
What functions are used in dynamic memory allocation in c?
What is double pointer?
Write a progarm to find the length of string using switch case?
What are the standard predefined macros?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
By using C language input a date into it and if it is right?
What are header files? What are their uses?
If I have a char * variable pointing to the name of a function ..
How do I create a directory? How do I remove a directory (and its contents)?
Is anything faster than c?
What are different types of variables in c?