Name an advantage of array over linked list?
Answer Posted / shruthi
1. Arrays have continguous memory allocation which makes it
easy to access elements inbetween.
2. As memory is allocated during compilation makes the
program faster
3. Fixed in size so if we are aware of the exact size of
datas then there can be no memory wastage which is also an
advantage linked list has.
4. Insertion and deletion at the end of the array is easy
but not inbetween.
5. Accessing data is easy a[2] etc
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
What is difference between oop and pop?
What is destructor oops?
Why is static class not inherited?
What does and I oop mean?
What is the significance of classes in oop?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
What is the importance of oop?
What is the important feature of inheritance?
Can a varargs method be overloaded?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is polymorphism and example?
What is polymorphism what are the different types of polymorphism?
can inline function declare in private part of class?
How long to learn object oriented programming?
Why do we use class?