In: Computer Science
1)define variables.
2)define functions.
3)define data structure.
Variable:
A variable is a name given to a memory location in which we can store data. A data type is associated with a variable. In programming languages like C, we have to declare a variable by specifying its data type, and then it can hold only that particular type of data.
Eg: int a;
a is a variable of type int. a=10, assigns the value 10 to
variable, a.
Function:
A function is a group of statements, that togerther performs a task. It enables code reusability. We can execute the same set of code again and again by calling the function using function name.
Eg: In C,
void printSum(int a, in
b){
int sum = a + b;
printf("%d", sum);
}
The function printSum() accepts two integers a, and b and prints its sum.
Data Structure:
A data structure is a way of organizing and storing data in memory in such a way that we can retrieve and perform operations on that stored data effectively.
For Eg, Structure is a data structure in C,
struct student{
int id;
char name[10];
int mark;
};
The above structure students helps to bind the name, id and mark of a student together, store it, and also to perform operations on the data effectively.
Please don't forget to give a Thumbs Up.