0

Hello,In any programming language why it becomes important to follow a predefined syntax?

Let us take c language.so we have to first declare data type of variable and then its name.See below: Int a=5; Why can't we write a int=5; why it will be wrong.

21st Apr 2019, 1:25 PM
NAVJOT SINGH
NAVJOT SINGH - avatar
3 Réponses
+ 3
it is just the way the language is designed. You could, in theory, write your own language by changing things you dont like in other languages, but, is that worth it?
21st Apr 2019, 2:51 PM
Bebida Roja
Bebida Roja - avatar
+ 1
a = 5 Means value stores in a with data type int In case a int = 5; It's int is datatype not store numbers
21st Apr 2019, 2:35 PM
Saad Saleem
Saad Saleem - avatar
+ 1
let make this simple, you feel hungry and need to eat, you will decide on what to eat depending on what you feel like eating that's data types, the food you prepare to it is the value, and your stomach is the variable which houses all the food, just like int a=5; //and the semicolon tell you to stop eating while you are filled up 😂😂😁😁 hope that helps
21st Apr 2019, 9:35 PM
✳AsterisK✳
✳AsterisK✳ - avatar