Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Describe under the topic: Algorthms and data structures 1. Static character vari

ID: 3663931 • Letter: D

Question

Describe under the topic: Algorthms and data structures 1. Static character variable 2. Dynamic character variable 3. Semi static character variable 4. Advantages and disadvantages of using linked storage for storing strings 5. 5 types of graphs with diagrams


Describe under the topic: Algorthms and data structures 1. Static character variable 2. Dynamic character variable 3. Semi static character variable 4. Advantages and disadvantages of using linked storage for storing strings 5. 5 types of graphs with diagrams


1. Static character variable 2. Dynamic character variable 3. Semi static character variable 4. Advantages and disadvantages of using linked storage for storing strings 5. 5 types of graphs with diagrams



Explanation / Answer

1.A static variable is a variable that has been allocated statically—whose lifetime or "extent" extends across the entire run of the program. This is in contrast to the more ephemeral automatic variables (local variables are generally automatic), whose storage is allocated and deallocated on the call stack; and in contrast to objects whose storage is dynamically allocated in heap memory.

When the program (executable or library) is loaded into memory, static variables are stored in the data segment of the program's address space (if initialized), or the BSS segment (if uninitialized), and are stored in corresponding sections of object files prior to loading.

The static keyword is used in C and related languages both for static variables and other concepts.

2.Dynamic character variables means the length of the variable may vary during the execution of the program.

3.The Semi static character variable means length of the variable may vary during the execution of the program, but the length cannot exceed a maximum value defined before the program is executed.The semi static character variable is often the plot, if the plot changes, the semi static character may change as well.

4.Advantages of using linked storage for storing strings

- Dynamic structure (Mem. Allocated at run-time).
- We can have more than one datatype.
- Re-arrange of linked list is easy (Insertion-Deletion).
- It doesn’t waste memory.

Disadvantages of using linked storage for storing strings

- In linked list, if we want to access any node it is difficult.
- It is occupying more memory.