Write code for initializing one dimentional and two
dimentional array in a C Program?

Answer Posted / kalpana.y

array:array is a collection of elements
one dimensional array:
code:
datatype arraysize[];
eg:
int a[5];
two-dimensional array:
code:
datatype array[rowsize][columnsize];
eg:
int a[5][5];

Is This Answer Correct ?    14 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State the difference between x3 and x[3].

863


Why main function is special give two reasons?

1241


How can I remove the trailing spaces from a string?

843


What is the use of a semicolon (;) at the end of every program statement?

1163


Add Two Numbers Without Using the Addition Operator

578


What is size of union in c?

784


Is int a keyword in c?

748


Is fortran still used in 2018?

819


How can I get the current date or time of day in a c program?

984


When we use void main and int main?

831


Difference between linking and loading?

911


What is the difference between %d and %i?

844


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

1857


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

820


How can you allocate arrays or structures bigger than 64K?

919