answersLogoWhite

0

I'm not sure what you're asking. Do you mean when you declare/instantiate an array like this?

int[][] arr;

arr = {{1, 2, 3},{4, 5, 6}};

I think that's right.

***********************************

THIS IS INCORRECT

because you can assign constant values to array only at time of initialization.

Therefore above code will throw an error.

Correct way is:

int[][] arr = {{1, 2, 3},{4, 5, 6}};

thanx ..

itsabhinav123@gmail.com

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Declare a numerical variable precise and initialize it to the value 1.09388641?

double precise = 1.09388641;


Write a pseudocode statement that declares the variable total so it can hold integers Initialize the variable with the value 0?

Declare Real price=49.95 Display "the original price." Input item original price Display "price"


How do you declare and initialize constant arrays?

example in C: const int a [] = {10, 20, 40, 80};


How do you find factorial 5 in C programming?

to find the factorial we declare a variable n and initialize its value to 1 initiate a loop for example a for loop and multiply the numbers upto 5 code:- for(i=1,n=1;i<=5;i++) { n=n*i; }


Can you declare a variable with abstract keyword?

no it is not possible


How do you declare an integer?

datatype variable name;


What is variable declarations?

A variable declaration is a math or programming term. A variable is an unnamed component. In the problem the wording will declare what the value of the variable is.


How you declare a variable in c language?

you have to give a statement in the following syntax datatype variable;


How can I declare a double precision variable in Fortran?

To declare a double precision variable in Fortran, you can use the "real(kind8)" declaration. This specifies that the variable should be of double precision, which is typically 8 bytes in size.


Can you declare a static variable in a header file?

Yes.


Are you required to initiate a variable when you first declare it in php?

no


Is it possible to declare a variable with abstract keyword?

yes