Consider the following variable declarations and definations in C . (i) int var _ 9 =1 ; (ii) int 9 _ var =2; (iii) int + =3; Choose the correct statement w.r.t above variables.
Consider the following variable declarations and definations in C . (i) int var _ 9 =1 ; (ii) int 9 _ var =2; (iii) int + =3; Choose the correct statement w.r.t above variables. Correct Answer Both i. & iii. are valid
In C language, a variable name can consist of letters, digits and underscore i.e. _ . But a variable name has to start with either letter or underscore. It can't start with a digit. So valid variables are var_9 and _ from the above question. Even two back to back underscore i.e. __ is also a valid variable name. Even _9 is a valid variable. But 9var and 9_ are invalid variables in C.
মোঃ আরিফুল ইসলাম
Feb 20, 2025