Answer:
Definition and example
Explanation:
An attribute defines a property of an object. Not only for an object but also it can be defined for any file or element. In other words we can say that an attribute of an object comprises of a name and a value of an element. Moreover it can be a type or class name of a file. An attribute example in C++ to apply a constraint is:
int g(int i)
{
if (i > 0)// applying constraint/defining attribute
return i;
else
return -1;
// Code
}