Which characteristics you will consider while selecting a data structure?
# Do you need random access to the data? # Does the data need to be ordered? # Can there be duplicate entries? # Are you more interested in reading from or writing to the data structure? # Are you more interested in data access speed or data storage size?
Differences between b tree and b tree?
Answer:
Binary tree is a tree data structure in which each node has at most two children. Typically the first node is known as the parent and the child nodes are called left and right.
A B-tree is a tree data structure that keeps data sorted and allows searches, insertions, deletions, and sequential access in logarithmic amortized time. The B-tree is a generalization of a binary search tree in that more than two paths diverge from a single node. Unlike self-balancing binary search trees, the B-tree is optimized for systems that read and write large blocks of data. It is most commonly used in databases and filesystems.
What is it called when a criterion is true if either individual criterion is true?
Criteria is true if either individual criterion is true is called "or" in Logic. (Criteria is plural form of criterion)
What is the first indication that ram has been removed?
Hi,
If you want to know whether RAM is in the system or not, Just press "Window" key and "Pause Break" together. It will give you the whole description of your computer including your operating system and you can see whether RAM of the computer has been removed or not under "computer".
Just try this and let me know if I could answer your question currectly..
Debugging a program is to correct, remove a fault, produce better security, etc, in a computer program.
scanf: scanf is a built-in function to read input from the user.
List advantages of Object Oriented Pascal programming language?
Object-Oriented Programming has the following advantages over conventional approaches:
* OOP provides a clear modular structure for programs which makes it good for defining abstract datatypes where implementation details are hidden and the unit has a clearly defined interface.
* OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones. * OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces.
What is the difference between static global and local global variable?
First, lets speak about the scope of a variable. The scope of a variable is the section of the application that can see and manipulate that variable. If the variable is declared in a procedure when that procedure is called, only that procedure can use that variable. Hence that variable is considered "Local".
Now Static. Static variables are variables that are created with the static key word as in:- function ab(var1 as integer)as integer static iTotal as integer itotal =iTotal + var1 (rest of ccode goes here) end function
Now when this function is called the first time, iTotal will be assigned the value of var1. The next time the function is called, iTotal will retain the previous value and the new value of var1 will be added to it. Hope this helps. (theTeacha)
Static variables life time is not under any scope.It initializes only one time from creation to delete.let me explain by a pgm.
void main()
{
int a=1;
static s=1;
int k=0;
for(k=0;k<1;k++)
{
i++;
s++;
main();
}
printf("%d is i",&i);
printf(%d is S",&s);
getch();
}
Output will be
2 is i
3 is s
It Shows that local variable initialize every time the function call.But Static variable initializes only once
<><><>
For a variable, static means it keeps its value even when the enclosing code is not active--out of scope. A static variable is assigned to a fixed memory location when the program runs, so it is possible to examine a static variable at any time the program is active, even when the function where the var is declared is not active. A local variable is dynamically allocated storage space when a function is called, and its storage is given up when the function ends, so it only exists while the function is executing.
For a function, static declaration means it can only be called from functions in the same file (in C).
What is a no args constructor?
No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.
No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.
No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.
No args means no arguments. Just like any regular method, a constructor can have zero or more arguments.
How we write pseudo code for adding two numbers?
Pseudocode is typically only used to describe the solutions to large problems. It is used to make complex things simple. If part of your pseudocode included telling someone to add two numbers, you would simply write: num1 + num2
What is a set of computer instructions that carries out a task on the computer?
A set of instructions that run on a computer that enables it to execute a specific task is called a program. Computer programs use several different types of calculating to make the computer do what the user wants it to do. One example is binary code programming.
Explain the differences between Assembly Language and High Level Language?
Assembly language is used to write programs using the instruction set for a particular processor/controller.(example : 8051 or 8086 or MIPS).
Assembly Language require an ASSEMBLER to convert the assembly code to machine level code(HEX CODE)
High Level Language require a Compiler to convert into ASSEMBLY THEN machine level code.(Now-a-days compilers are smart enough to generate the machine code directly)
To write assembly code it is necessary to know the architecture of the processor or controller.
To write an High Level Program it is not neccessay to know the architecture completly.
Assembly language is not protable.
High Level Language is Portable.
with regards
Mohan Kumar.J
MCIS,
MANIPAL.
Assembly language is used to write programs using the instruction set for a particular processor/controller.(example : 8051 or 8086 or MIPS).
High Level Language is used to write programs using some grammer rules or languages created like C,PASCAL,FORTRN,JAVA.
Assembly Language require an ASSEMBLER to convert the assembly code to machine level code(HEX CODE)
High Level Language require a Compiler to convert into ASSEMBLY THEN machine level code.(Now-a-days compilers are smart enough to generate the machine code directly)
To write assembly code it is necessary to know the architecture of the processor or controller.
To write an High Level Program it is not neccessay to know the architecture completly.
Assembly language is not protable.
High Level Language is Portable.
with regards
Mohan Kumar.,
MCIS,
MANIPAL.
EACH HLL INSTRUCTION SPECIFY SEVERAL INSTRUCTIONS IN isa OF COMPUTER. WHEREAS EACH aSSEMBLY LEVEL INSTRUCTION SPECIFIES A SINGLE INSTRUCTION IN ISA OR MACHINE LEVEL LANGUAGE
PRIYA BAJAJ
WIPRO TECHNOLOGIES
BANGALORE
Answer--Assembly language :-A programming language that is once removed from a computer's machine language. Machine languages consist entirely of numbers and are almost impossible for humans to read and write. Assembly languages have the same structure and set of commands as machine languages, but they enable a programmer to use names instead of numbers.
Each type of CPU has its own machine language and assembly language, so an assembly language program written for one type of CPU won't run on another. In the early days of programming, all programs were written in assembly language. Now, most programs are written in a high-level language such as FORTRAN or C. Programmers still use assembly language when speed is essential or when they need to perform an operation that isn't possible in a high-level language.
High-level language:-
-JP Morgan
A programming language such as C, FORTRAN, or Pascal that enables a programmer to write programs that are more or less independent of a particular type of computer. Such languages are considered high-level because they are closer to human languages and further from machine languages. In contrast, assembly languages are considered low-level because they are very close to machine languages.
The main advantage of high-level languages over low-level languages is that they are easier to read, write, and maintain. Ultimately, programs written in a high-level language must be translated into machine language by a compiler or interpreter.
The first high-level programming languages were designed in the 1950s. Now there are dozens of different languages, including Ada, Algol, BASIC, COBOL, C, C++, FORTRAN, LISP, Pascal, and Prolog.
An assembly language is where each statement corresponds to one machine instruction. A high level language is where each statement corresponds to more than one, sometimes many, machine instructions.
What Is a translating program which translates entire source program into machine language program?
High-level source code is converted to native machine code either by an interpreter or a compiler. Interpreted code requires a runtime in order to perform the conversion each time the program is executed whereas compiled code typically produces a standalone machine code program that can be executed without further interpretation. There are some exceptions, most notably Java which is first compiled to Java byte code which is then interpreted by the Java virtual machine on each execution.
An interpreter always converts high-level code to native machine code but, because it must perform the conversion while the code is executing via the interpreter, interpreted code executes much more slowly than native machine code.
Technically, a compiler is simply a program that converts high-level code to a lower-level code. That lower-level code could be another high-level language. For example, a C++ source could be compiled to produce a C source. However, converting the other way around (such as from C to C++) can only be done manually because humans can think in abstract terms far more easily than machines can.
Low-level assembly language source are converted to machine code using an assembler. Machine code can also be disassembled to produce an assembly-like source known as a disassembly, however the resultant code is extremely low-level because there are no named variables (only memory offsets) and all user-comments will have been stripped out during assembly or compilation.
Arithmetic density is the total number of people divided by the total land area
it like this the total population divided by the total land area that is cultivated or in simple TP/TLA
It's important because knowing the population and the land that they are inhibiting could help knowing how many towns, or city's they can build for the population in the future. If the land is overpopulated, they would need to find a way to take all those people and fit them in. Also, Knowing how many people take up the land can determine how much agricultural density is needed for the people there or in other places. Normally, when land is overpopulated, more people will want to move there. So knowing the population would prepare them for immigrants to come into the area. Hope this helped.
Program in c to find the value of nCr using function?
/*
* Purpose : Calculate the factorial of a number
* Inputs : int x -- the number of interest
* Outputs : x! if x is non-negative, -1 otherwise
*/
int factorial (int x)
{
int x_factorial = x;
if (x > 0)
{
while (x > 1)
{
x_factorial *= --x;
}
return x_factorial;
}
else if (x = 0)
return 1;
else
return -1;
}
/*
* Purpose : Calculate the binomial coefficient nCr
* Inputs : int n -- the set size
* int r -- how many to choose
* Outputs : The binomial coefficient nCr if r is valid, -1 otherwise
*/
int nCr (int n, int r)
{
if (r >= 0 && n >= r)
return factorial(n) / (factorial(r) * factorial(n - r));
else
return -1;
}
Steps in creating a computer program?
Making software programs You're not asking much are you? :) To write software you need to be familiar with a programming language like Visual Basic. There are actually many programming languages and some are more suited for different kinds of programming. 'Making' software programs is not at all the same as 'making' computers. I'd suggest you do a little research - do some internet searches, read a few books, take some classes. Your question is really beyond the scope of this forum.
On programming, the first step is to know the languages you intend to use and know the interfaces with the operating system (APIs). Then you need to figure out what you want the program to do overall. Then you got to figure out the overall strategy for doing each of the main functions. Then you start coding. After you get the program working, then you test it and look for bugs and keep coding until you squash all the bugs you can find.
It is all 1's, no matter how many bits you have. The first 1 is for the negative sign, and you can think of the rest of the number being all 1's, because -1 is the highest negative whole number, then as you go down the negative whole numbers from there, (-2, -3, -4), etc you count backwards from there (always keeping the first 1 as a 1 for the negative sign).
Another way to get a negative number's two complement is to flip all the 1's and 0's, make the first bit a 1, and add 1 to the number
When you add a positive number and a negative form of that number, you get all 0's with a 1 carried to the far left of the number. If for example you have 2 eight bit numbers, one positive and one is 2's complement negative of the positive number
(eg: 2 + -2), it gets all 0's with 1 carried outside of the number - so in a computer it get represented as a 0 (because the 1 gets lost - since these are only 8 bit numbers each)
So the 2 compliment's system makes sense in more then one way.
What are the languages used in Application program?
The Java compiler is written in Java (fun), while the JRE is written in ANSI C.
There is no single answer to this question. A byte is universally defined as a tuple of 8 bits (sometimes bytes are also called octets, therefore).
However, a word commonly refers to the natural word for a given processor, that is the processor's preferred entity for arithmetic operations. The word is therefore typically defined by the processor's ALU width.
Typical 8, 16 or 32 bit processors have 8, 16 or 32 bit words (containing 1, 2 or 4 bytes), respectively. Other processors have another word size, such as 3 bytes per word, or 8.
In Windows programming, a word is often thought to refer to a 16 bit entity, mostly because the classic 32-bit Windows API makes frequent use of DWORD, a double-word, 32 bits or 4 bytes wide. However, these data types are not generally portable and are not recommended for use outside the specific context of this API.
How many compiler in c plus plus?
They are completely unrelated. Java was designed as an attempt to improve C++, and C# was designed as an attempt to improve Java, so they have many things in common. They are not, however, the same language.
Volatile variables are variables that may change value while they are being operated upon. For instance, a hardware clock is constantly updated by the operating system, thus its value is constantly changing. If you refer to the value, you must declare it volatile because the value is outwith the control of the program.
The inventor of Turbo Basic was Robert Zale. Borland bought the rights to it, but when they left the compiler market, they sold the rights back to Robert Zale, where he continued to develop it into an updated version, PowerBASIC.
256 MB = 1/4 of a GB. So there is a fourth of a gigabyte in 256 megabytes.