answersLogoWhite

0


Best Answer

to create user defined functions the user defined data is needed nd its useful to the programmer to create its own data.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is use of user defined data in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the properties of data types?

When we enter a variable then we know it what type it belong ,but the compiler does not know it ,for knowing it we declare data types. Storage representations & machine instructions to handle constants differ from machine to machine.The variety of data types available allow the programmer to select the type appropriate to the needs of the application as well as the machine. ANSI C supports 3 types of data types 1.Primary data types 2.Derived data types 3.User defined data types JAVA has 2 types 1.In Built data types 2.User Defined datatypes


Can a C plus plus user defined function return a value?

Absolutely. Indeed, any function (user-defined or built-in) that does not return a value is not really a function, it is simply a procedure.


Is a header file a collection of built in functions that help in writing c programs?

No. There are no built-in functions in C, there are only built-in types and built-in operators for those types. All functions are user-defined, including those defined by the C standard library. There are no user-defined operators in C, but you can implement operators as named functions if required. A header file (*.h file) typically contains a group of related user-defined function and/or user-defined type declarations which can be included in any source file that requires them. Every user-defined function or user-defined type name used by a program must have one (and only one) definition, usually contained in a corresponding source file (*.c file) or library file (*.lib file). Built-in types and their corresponding operators do not require a header file since they are part of the language itself (hence they are built-in).


Which control allows the end user to enter any data they wish in c?

One can use System.Object datatype to hold any values.


Define objects and show how they act as user defined data type in c plus plus with the help of a programme?

An object is an instance of a class. A class is a data type that combines data and the specific methods that operate upon that data into a self-contained entity. To prove that objects are user-defined types, consider the following: class foo { }; int main() { foo a; foo b; foo c = a + b; // ERROR! } The reason there is an error is because the plus operator (+) only works with primitive data types (integral, arithmetic and built-in data types). foo is neither an integral, arithmetic nor built-in data type, thus the plus operator is not supported. However, if you provide a user-defined plus operator overload (foo::operator+) that accepts a constant reference to a foo object, the code will compile. It's up to you, the class designer, to provide the appropriate implementation.

Related questions

User defined data type in c plus plus?

Use "typedef" : both in C and C++.


What is the need for operator overloading?

1. Most fundamental data types have pre-defined operators associated with them. For example, the C++ data type int, together with the operators +, -, *, and /, provides an implementation of the mathematical concepts of an integer. To make a user-defined data type as natural as a fundamental data type, the user-defined data type must be associated with the appropriate set of operators. 2. Increases user readabitily.


In c programming is main predefined or user defined?

main is predeclared and user defined.


What are the advantage and disadvantage of operator overloadin?

Operator overloading allows c/c++ operators to have user defined meanings on user defined types. For example + operator is used to add to numbers but we can also use it for concatenating a string the only limitation is you cannot change the literal meaning of the operator.


What is the range of data types in C programming language?

The ranges for all data types in C are implementation-defined.


What is the difference between pre defined functions and user defined functions?

Predefined functions are functions that have been written and we can use them in our C++ statements. But we must know how to use each of these predefined functions.


What is headderfile in c language?

Header File in C/C++ are the files which contains the definition of the pre-defined functions, data-types & constants, etc. By adding the header file you reduce your job of defining the same functions which are defined earlier by someone else & you can use those functions/data-types easily.


Which characters cannot be used in user-defined names in C?

The space and punctuation characters cannot be used in user-defined names. Only letters, digits and the underscore character are permitted, but a user-defined name cannot begin with a digit. User-defined names include function names, type definitions, enumerations, variables and constants.


What are the properties of data types?

When we enter a variable then we know it what type it belong ,but the compiler does not know it ,for knowing it we declare data types. Storage representations & machine instructions to handle constants differ from machine to machine.The variety of data types available allow the programmer to select the type appropriate to the needs of the application as well as the machine. ANSI C supports 3 types of data types 1.Primary data types 2.Derived data types 3.User defined data types JAVA has 2 types 1.In Built data types 2.User Defined datatypes


What is UDT and SQL?

UDT stands for User-Defined Types, which allow users to define their own data types in programming languages like C++. SQL (Structured Query Language) is a standard language for interacting with relational databases, used for tasks like querying data, updating records, and defining database structures.


Can a C plus plus user defined function return a value?

Absolutely. Indeed, any function (user-defined or built-in) that does not return a value is not really a function, it is simply a procedure.


Is a header file a collection of built in functions that help in writing c programs?

No. There are no built-in functions in C, there are only built-in types and built-in operators for those types. All functions are user-defined, including those defined by the C standard library. There are no user-defined operators in C, but you can implement operators as named functions if required. A header file (*.h file) typically contains a group of related user-defined function and/or user-defined type declarations which can be included in any source file that requires them. Every user-defined function or user-defined type name used by a program must have one (and only one) definition, usually contained in a corresponding source file (*.c file) or library file (*.lib file). Built-in types and their corresponding operators do not require a header file since they are part of the language itself (hence they are built-in).