What is a C array and illustrate the how is it different from a list.



What is a C array and illustrate the how is it different from a list...

Answer / rutuja pawar

Suppose,
int arr[5]={10,20,30,40,50};
I want to add value at index first 60,so array will change like that
arr[5]={10,60,20,30,40,50};
for this output I have to shift the array element.
but in List I can insert directly and delete directly.
that means:
1) In Array: Insertion and deletion is not faster , but Accessing time is less
2)In List: Insertion and deletion is faster but accessing time is more.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is pointer to pointer in c with example?

0 Answers  


How will you allocate memory to a double pointer ?

2 Answers  


Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)

1 Answers  


what is difference between #include<stdio.h> and #include"stdio.h"

4 Answers  


What are pointers? What are stacks and queues?

0 Answers   Hexaware,






What is break in c?

0 Answers  


How many levels of pointers can you have?

0 Answers  


Why header file is used in c?

0 Answers  


Write a program to find the number of times that a given word(i.e. a short string) occurs in a sentence (i.e. a long string!). Read data from standard input. The first line is a single word, which is followed by general text on the second line. Read both up to a newline character, and insert a terminating null before processing. Typical output should be: The word is "the". The sentence is "the cat sat on the mat". The word occurs 2 times.

0 Answers  


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

0 Answers  


Why header files are used?

0 Answers  


In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }

1 Answers  


Categories