vendredi 22 septembre 2017

Is variable assignment a statement or expression?

I am familiar that statements do something and that expressions are a "collection of symbols that make up a quantity" (What is the difference between an expression and a statement in Python?). My question is: when you assign a value to a variable is that assignment a statement or an expression?

For example (in C):

int x = 5;

Aucun commentaire:

Enregistrer un commentaire