96.8k views
3 votes
You may declare an unlimited number of variables in a statement as long as the variables are ____.

a.
initialized to the same value

b.
the same data type

c.
properly commented

d.
floating point numbers

User Hanh Le
by
5.1k points

1 Answer

2 votes

Answer:

b. the same data type

Step-by-step explanation:

Any number of variables can be declared in a statement as long as the variables have the same data type. For example:

1) int a,b,c,d,e;

Here each of the declared variables a,b,c,d,e have the type int.

2) char p,q,r,s,t,u,v,w;

In this case variables p to w all have the type char.

3) float x,y,z;

x,y and z are all of type float.

User Baruch Even
by
5.5k points