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 |
What is pointer to pointer in c with example?
How will you allocate memory to a double pointer ?
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)
what is difference between #include<stdio.h> and #include"stdio.h"
What are pointers? What are stacks and queues?
What is break in c?
How many levels of pointers can you have?
Why header file is used in c?
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.
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)
Why header files are used?
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 */ }