answersLogoWhite

0


Best Answer

Sizeof is an example.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a sizeof function in C programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is combination a library function in c language of programming?

No.


Why use length function to find length of primitive data type array object?

There is no length function in C. You may have thought of sizeof or strlen. Perhaps.


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(); }


What is fncn in C programming?

1. identifier 2. short for function


What is a malloc function in C programming with example?

The malloc() function is part of a class of functions that deal with the allocation of memory on the heap. int *a = malloc (sizeof (int) * 100); /* allocate 100 int's */ if (a == NULL) {...} /* deal with possible malloc failure */ /* use a, either as pointer or as array of 100 ints */ free (a); /* release memory back to the library */

Related questions

Why you call sizeof is a operator not a function in c language?

If sizeof were a function, the following code would work (you can try with any other function):printf ("Function sizeof is located at %p", sizeof);On the other hand, the following code wouldn't work, as functions don't accept a type as parameter:size_t intsize= sizeof (int);


How do you print size of integer?

the size of an integer is determaind by using the function "sizeof(c)",here 'c' is any integer.


What is d command for squareroot in C programming?

There are no commands in C-programming, you should use function sqrt from math.h


Is combination a library function in c language of programming?

No.


Why use length function to find length of primitive data type array object?

There is no length function in C. You may have thought of sizeof or strlen. Perhaps.


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));


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(); }


What is the function of square root in C programming?

it is sqrt in header math.h


What is fncn in C programming?

1. identifier 2. short for function


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.


To create a user defined sizeof function?

Not possible.


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.