answersLogoWhite

0

What is built-in function in c?

Updated: 8/10/2023
User Avatar

Wiki User

12y ago

Best Answer

There are no built-in functions in C++. The definition of a built-in function is a function that does not need to be declared before it is used, but every function in C++ is user-defined and must be declared before it can be used. This includes functions provided by the C++ standard library which we declare by including the appropriate headers.

Some articles mistakenly describe keywords such as while, switch and if as being built-in functions, however these are statements, not functions.

C++ does provide several built-in operators, some of which look and behave very much like functions. For example, the built-in sizeof() operator can be used without any declaration and looks very much like a function, but its argument is not a value, it is a type name, and we cannot (easily) define a function that accepts a type name as an argument.

The built-in typeid() operator also takes a type name argument, but it is often mistakenly regarded as being a user-defined function because we must include the C++ standard library header in order to use it. But that header is only required because the return value is a std::typeinfo object which is not a built-in data type.

Unlike sizeof() and typeid(), the default global new and delete operators can be overridden with user-defined function operators, thus these are also mistakenly regarded as being built-in functions. However, only the overrides are functions because that's the only way to define an operator overload; the default global operators are built-in operators, not built-in functions.

The semantic difference between a built-in operator and a built-in function may seem insignificant, however a real built-in function would be no different to a user-defined function other than the fact that it need not be declared before using it. But a user-defined function also has identity (a memory address) and we can pass that identity to other functions using a function pointer argument. But we cannot pass a built-in operator to a user-defined function because it has no identity, thus it cannot be regarded as being a built-in function.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

1. Compiler-dependent, tipically: memcpy, memcmp, strcpy, strlen, strcmp.

2. sizeof -- but that isn't really a function

This answer is:
User Avatar

User Avatar

Wiki User

6y ago

There are no built-in functions in C. All functions are user-defined, including those defined by the C standard library, which is a user-defined library just like any other.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is built-in function in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What does the function counter do and what are its parameters?

There is no builtin function 'counta' in C.


Does the hpg60 have bluetooth?

yes,it has builtin


Does the xbox Kinect have builtin wifi?

yes it does


What is the android language coding?

The operating system itself consists of Java and C/C++. The applications are written primarily in Java for the builtin Java virtual machine. (Dalvik in Android < 5.0, ART in Android >=5.0)


What is C and function it?

It is a letter and function it.


Main function in c?

The main function defines the entry point of an application in C.


Where are Volvo trucks builtin North America?

Greensboro, NC.


What are the building function in c plus plus?

There is no such term as "building function" in C++.


How do you use this function in c programme?

I don't use that function in C programme.


What is the differnce between ordinary function and template function of c language?

The c language does not have template functions. That is a c++ thing.


Who is calling main function in c?

in c main function initailly called by operating system.


What is main function used in c?

if you do not used main function in c program when errors are accrued