what is the output of the code and how?
main()
{
int *ptr,x;
x=sizeof(ptr);
printf("%d",x);
}
Answer / veluri.haritha
If a compiler is a 16 bit compiler and its memory model is
tiny or small or compact memory model then the "x" value
will be 2 bytes.
if the memory model is large or huge memory model then the
"x" value will be 4 bytes.
if a compiler is a 32 bit compiler then the also the x value
is 4 bytes
by
V.haritha,not yet joined in B.tech
| Is This Answer Correct ? | 13 Yes | 0 No |
Is boolean a datatype in c?
Do pointers store the address of value or the actual value of a variable?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
Why do we use namespace feature?
What are local variables c?
Explain how do you sort filenames in a directory?
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.
What is external variable in c?
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a
Write a program that his output 1 12 123
Why do we use int main instead of void main in c?
what is pointer