of the following are invalid variables? Give reasons:
(a) C (7,2)
(b) $
(c) A2$
(d) TOTAL
(e) PRICE 2
Answers
Answered by
11
Answer:
a) C(7,2)
Explanation:
because it's the function calls expression
Answered by
6
Variable declaration:
invalid varaible is "option a and option e"
Explanation:
- In the given question "Option a, and Option e" were incorrect because, in option a, it uses the C with a parameter, that accepts integer number in parameter, which is used mainly function calling.
- In option e, wide space is illegal in variable declaration.
- In the above example option b, c and d is correct because they all were used in a variable declaration, that can be explained by the below example:
Example:
#include <iostream> //defining header file
using namespace std;
int main() //defining main method
{
int A2$ =10; //defining integer variable and assign values
int TOTAL=12;//defining integer variable and assign values
int $=121;//defining integer variable and assign values
cout<< A2$<<endl; //print values
cout<<TOTAL<<endl;//print values
cout<<$<<endl;//print values
return 0;
}
Output:
10
12
121
Learn more:
- Variable declaration rule: https://brainly.in/question/10549411
Similar questions