How many parts are there in a declaration statement?

Skill/Topic: Variables and Pointers
A) 1
B) 2
C) 3
D) 4

Showing Answers 1 - 11 of 11 Answers

samiksc

  • Jan 19th, 2006
 

(C) 3.

There are 2 mandatory parts, variable identifier and data type. Third type is optional which is an optional value.

  Was this answer useful?  Yes

A.Rajeshwari

  • Mar 7th, 2007
 

4 parts
   i. storage class(optional, default is auto)
  ii. data type modifier or qualifier (signed,unsigned,long or short)
 iii. data type
 iv. variable list

M.Ahmar

  • May 18th, 2007
 

3 Parts.

Scope (private/public/protected), DataType (integer, short, byte, string, etc...), Variable name

Examples:

private int i;
public string name;

  Was this answer useful?  Yes

ahmarshi

  • May 18th, 2007
 

3 parts.

  i. SCOPE (private/public/protected)
 ii. DATATYPE (int, short, long, byte, string, char, etc...)
iii. VARIABLE NAME

e.g.

private int id;
private string name;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions