answersLogoWhite

0

How size-of variable is used in c?

User Avatar

Anonymous

13y ago
Updated: 8/20/2019

The Sizeof () operator only works at compile time and doesn't evaluate anything at run time.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How is the 'sizeof' keyword in a c program used to determine the amount of space of a variable?

It is 'sizeof'. Example: printf ("sizeof(int)=%d\n", sizeof (int));


What is size of operator in c language?

it is used to know the memory size of variable of data type. Ex: float a; printf ("sizeof (a)= %d\n", sizeof (a)); or: printf ("sizeof (float)= %d\n", sizeof (float));


How do you find length of integer variable in c?

It doesn't have length, but you can use sizeof to find out its size.


What is the use of 'size of' in c programming?

The sizeof operator is used to determine the length of its operand (in bytes). The operand must be a type or an object of a type (a variable). The operator is a constant expression and therefore executes at compile time. As such there is no runtime overhead in repeated use of the sizeof operator.


What is a sizeof function in C programming?

Sizeof is an example.


What is the syntax for determining the size of an array in C using the keyword sizeof?

To determine the size of an array in C using the keyword sizeof, you would use the syntax: sizeof(array) / sizeof(array0).


Which is dummy operator in c?

unary + is the only dummy operator in c,...


Sizeof operator to determine the memory occupied by structure variables and pointers?

C and C++ both include the built-in sizeof() operator to do just that.


Write a c program to print the sizes and ranges of different data types in c?

#include<stdio.h> #include<conio.h> void main() { float f1,*Ptr1,*Ptr2; ptr1 = &fl; ptr2 = (&fl+1); printf("%u",(char *)ptr2-(char *)ptr1); getch(); }


How do you write c plus plus program to display size of the each data type?

The core if it would contain lines like these: printf ("sizeof (char)=%d\n" "sizeof (short)=%d\n" "sizeof (int)=%d\n" "sizeof (long)=%d\n" "sizeof (long long)=%d\n" "sizeof (size_t)=%d\n" "sizeof (void *)=%d\n" "sizeof (ptrdiff_t)=%d\n" "sizeof (va_list)=%d\n" "sizeof (intptr_t)=%d\n" , (int)sizeof (char) , (int)sizeof (short) , (int)sizeof (int) , (int)sizeof (long) , (int)sizeof (long long) , (int)sizeof (size_t) , (int)sizeof (void *) , (int)sizeof (ptrdiff_t) , (int)sizeof (va_list) , (int)sizeof (intptr_t) );


In pointers what is the use of pointer variable?

Pointer is a variable that stores the address of another variable . So pointer basically stores the address of another variable and size of pointer can be evaluated by using sizeof operator.


A simple program to find the size of different basic data types in C?

you can just use sizeof. sizeof(int) for example