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

Answer Posted / raam_bangaloreallinter

1-D array:

int a[4]={ 10,20,30,40};

2-D array: # 2 columns and 2 rows
int a[2][2]= {
{100,200},
{300,400} };


Raam - ramumcato@yahoo.com

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between array and structure in c?

571


What is difference between array and pointer in c?

538


List some of the static data structures in C?

762


Explain the difference between strcpy() and memcpy() function?

595


Why do we use header files in c?

580






What is the use of extern in c?

647


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

648


What are the features of c languages?

628


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

733


Who invented b language?

915


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1497


What is a class c rental property?

610


Which type of language is c?

653


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2118


How do you sort filenames in a directory?

714