Allocation: .Are Linked Lists Considered Linear or Non-Linear Data Structures?
Allocation: .Are Linked Lists Considered Linear or Non-Linear Data Structures?
Allocation: .Are Linked Lists Considered Linear or Non-Linear Data Structures?
It depends on where you intend to apply linked lists. If you based it on storage, a linked list is considered
non-linear. On the other hand, if you based it on access strategies, then a linked list is considered linear.
getch(): reads characters from the keyboard but it does not use any buffers. Hence, data is not displayed on
the screen.
getche(): reads characters from the keyboard and it uses a buffer. Hence, data is displayed on the screen.
1 #include<stdio.h>
2 void main()
3 {
4 if(printf("hello world")){}
}
5
What is Bubble Sort Algorithm? Explain with a program.
Ans: Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent
elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is
sorted.
List the area of applications where stack data structure can be used?
o Expression evaluation
o Backtracking
o Memory Management
o Function calling and return
o Push Operations
o Pop Operations
AB+CD-*
Both
o Queues are widely used as waiting lists for a single shared resource like a printer, disk, CPU.
o Queues are used in the asynchronous transfer of data (where data is not being transferred at the same
rate between two processes) for eg. pipes, file IO, sockets.
o Queues are used as buffers in most of the applications like MP3 media player, CD player, etc.
o Queues are used to maintain the playlist in media players to add and remove the songs from the play-
list.
o Queues are used in operating systems for handling interrupts.
JVM
JVM is an acronym for Java Virtual Machine; it is an abstract machine which provides the runtime environment
in which Java bytecode can be executed. It is a specification which specifies the working of Java Virtual Machine.
Its implementation has been provided by Oracle and other companies. Its implementation is known as JRE.
JVMs are available for many hardware and software platforms (so JVM is platform dependent). It is a runtime
instance which is created when we run the Java class. There are three notions of the JVM: specification,
implementation, and instance.
JRE
JRE stands for Java Runtime Environment. It is the implementation of JVM. The Java Runtime Environment is a
set of software tools which are used for developing Java applications. It is used to provide the runtime
environment. It is the implementation of JVM. It physically exists. It contains a set of libraries + other files that
JVM uses at runtime.
JDK
JDK is an acronym for Java Development Kit. It is a software development environment which is used to
develop Java applications and applets. It physically exists. It contains JRE + development tools. JDK is an
implementation of any one of the below given Java Platforms released by Oracle Corporation:
No.
Is constructor inherited?
The this keyword is a reference variable that refers to the current object. There are the various uses of this
keyword in Java.
The constructor can be defined as the special type of method that is used to initialize the state of an object. It is
invoked when the class is instantiated, and the memory is allocated for the object.
Polymorphism is composed of two words - “poly” which means “many”, and “morph”
which means “shapes”. Therefore Polymorphism refers to something that has many
shapes.
A function is a group of statements that together perform a task. ... A function declaration tells the
compiler about a function's name, return type, and parameters. A function definition provides the actual
body of the function. The C standard library provides numerous built-in functions that your program can
call.