≡ Menu

What is the difference in meaning between x3 and x[3]

You are Here: Home > Computer Subjects > Programming in C Language > …

What is the difference in meaning between x3 and x[3]?

Ans. If we use these two name at the time of variable declaration then these two have two different meaning.
Suppose we declare a integer type of variable like:
int x3 – this line of code will allocate a memory space with a variable name x3 of integer type.

Now suppose we declare a integer type of variable like:
int x[3] – this line of code will allocate memory for three integer type of variable with the name x. This is the concept of array.

 

 Click Here to Find Latest Jobs and Current Affairs

 

 

{ 1 comment… add one }
  • Qasim Niaz February 24, 2013, 2:33 pm

    Please tell me…..
    Q:- For the declararion
    char grades[5];
    how many memory cells are allocated for data storage? What type of data can be stored there? how does one refer to the initial array element? to the final array element?
    PlZ HeLP ME :(

Leave a Comment