Computer Science, asked by ahmedpumpwala6024, 1 year ago

Explain the concept of variable and data type by suitable example? 1

Answers

Answered by aditimoulik2001
0

Variables are name given to memory locations which can be used to store data of a particular type. Every variable has a particular data type which is nothing but informs the compiler the type of data the variable is going to receive

Explanation:

Example: int A;

  • Here A is the name of the variable
  • int is the data type which tells the compiler that A can only take integers and throw an exception when the programmer gives some random input maybe characters like a,b,c,etc.

Don’t hesitate to consult for doubt in the comments below and Don't forget to mark it the brainliest if it helps.. #BAL #answerwithquality

Similar questions