Name an advantage of array over linked list?
Answer Posted / fias
Array data structure stored in stack memory, which means we
have allocation done at compile time and there is no complex
memory management required. Performance would be better if
we use array, but size is limited, we need to decide at
compile time.
Where as, linked lists are dynamic memory allocation, it
stored in Heap memory. Very flexible to handle it. But, it
requires memory management as we request more memory or
release memory at run time. Linked lists are best choice if
we don't know the memory requirement at run time.
| Is This Answer Correct ? | 10 Yes | 12 No |
Post New Answer View All Answers
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 are constructors in oop?
What are objects in oop?
What is inheritance in simple words?
What is the difference between encapsulation and polymorphism?
What is basic concept of oop?
Why is destructor used?
What is the significance of classes in oop?
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
#include
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is encapsulation in oop?
How to improve object oriented design skills?
can we make game by using c
What is the highest level of cohesion?