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

How do you define a string?

655


What is volatile, register definition in C

689


What is %d used for?

585


How can I do peek and poke in c?

619


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

604






What is the return type of sizeof?

593


code for find determinent of amatrix

1517


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

813


What is the hardest programming language?

671


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

631


Why is c platform dependent?

623


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1888


What is a buffer in c?

575


Can include files be nested?

629


Are there constructors in c?

595