What is the advantage of doubly linked list over Doubly linked list?
A doubly linked list can be traversed in both directions (forward and backward). A singly linked list can only be traversed in one direction.
A node on a doubly linked list may be deleted with little trouble, since we have pointers to the previous and next nodes. A node on a singly linked list cannot be removed unless we have the pointer to its predecessor. On the flip side however, a doubly linked list needs more operations while inserting or deleting and it needs more space (to store the extra pointer).
What is the difference between stack and array?
Briefly, there are two main differences between an array and a stack. Firstly, an array can be multi-dimensional, while a stack is strictly one-dimensional. Secondly, an array allows direct access to any of its elements, whereas with a stack, only the 'top' element is directly accessible; to access other elements of a stack, you must go through them in order, until you get to the one you want. I hope this answered your question.
OK?
What are disadvantages of a linked list over an array?
A linked list is better bcoz:
1. A linked list can be grown to any size whereas a statically allocated array is of a fixed size and hence can cause problems if you try to insert beyond that.
2. Deletion of elements is a problem in arrays. You either have to move all the elements following the deleted element forward which is a waste of time or you have to place a sentinel indicating that the element in that position is deleted which causes a waste of space.
On the flip side, arrays are easier to handle because their memory allocation is done once and for all(atleast till you need more space and have to reallocate) and because there is no hassle with pointers.
To "hover over" is to excessively manage another person's efforts, or to remain physically inside the appropriate perimeter during an activity. This term is often used about a mother's behavior with her child and is usually pejorative.
Moving the mouse over an object; moving the mouse on and off an object.
What is the c program to find the octal equivalent of an integer?
void Decimal_to_Octal()
{
int n,r[10],i;
cout<<"Enter a number to find it's octal equivalent";
cin>>n;
cout<<"The octal equivalent of "<
{
r[i]=n%8;
n=n/8;
}
i--;
for(;i>=0;i--)
cout<
What are the benefits of using functions?
A static function in class scope (within a class) can access only static class members (for all instances of the class). A static function in file scope (not within a class) is visible only to code within that compilation unit, i.e. it cannot be linked from file to file.
<p>You may know, in early days when there was no memory, once the program was written, they(computer scientists) fed input to the machine using switches and levers. That is , there is no interface between human and a computer. In this case , only people who were scientists,researchers could operate the computers. It was not possible for a common man to know about it. Also , its very hard to learn,understand,handle those machine ,even to people who are scientist etc.
As there was no memory, they had to fed the same intruction( thru switches and levers) whenever they need to solve the same problem.After the memory was found, the programs were stored in the memory(physical memory of the machine or like RAM), and were executed. At this times, older input techinques were modified according to it. Later assembly language( Mnemonics ) were used write instructions and these instructions were then translated into voltages (machine level code). Here, The technique Abstraction was used to cover the complexity of interacting with hardware. Even though it made work easier than before. It was too somewhat difficult to write programs in assembly language since the commands are difficult to remember. Also , each processor had its own assembly language. So that program written for one processor could not be used in another. This increased the difficulty to remember commands for different machines. Also, a program called "assembler" that translates assembly language to machine code also differed from machine to machine. On those days, writing assemblers was a nightmare and was badly difficult to design and implement. In assembly language only one instruction took chance to be translated and executed. So, it consumed more time to execute a program. All these drawbacks stimulated computer scientists to think for the alternatives. On each stage of this improvement, inventions in physics,electronics, mathematics were also made to improve the components of the machine. These technological improvements also increased the neccessity to replace the older techniques.
This is like two persons who know different languages, are trying to communicate each other.<p>
<p>
Later, high level languages were found so that its commands are in simple english words and can be remembered easily. It completely vanished the direct interaction with the hardware components. Its corresponding interface program is Interpreters/compilers( which is also a program) that translates the high level programs to the machine level code.
<p>
From the above discussion its clear that , in order to reduce the difficulties in communicating with the machine, one/more layer/s of abstraction is/are needed. That is, an intermediator is created and behaves as an interface between the programmer/user and the machine. This facilitates the programmer/user to interact with the machine and vice versa.So, Intended task is completed reliably and easily.
for example, its like a communication: English Speaker <--> Translator <--> French Speaker.
Also code written in High level language is optimized so that it keeps the size of the machine code small.
You can dig more under the titles : Compiler Design , The principles of programming languages.
Hope You got it.
How does open source software make a profit?
Usually, Open Source software derives its funds from either (a) technical support, or (b) donations to further development of the software. The former is incredibly common, and companies such as Red Hat have made a lot of money off of support licenses, while the latter was extremely common in the 90s and still often provide reasonable returns on investment.
What is the correct XHTML for a paragraph?
The correct XHTML for a paragraph would open the paragraph with a triangular bracketed p and close the paragraph with a triangular bracketed forward slash p. The tags must be in lower case in XHTML.
In order traversal is used.
How can you create a headerfile in a c?
Create the header file as a .h file in the same way you create a source file, .c and place it in the same directory as the .c files. To incorporate it, use the...
#include "my_header_file.h"
... directive. Note that there are double quotes instead of greater/less signs. This tells the compiler to look first in the source directory.
Spending Plan
How many bit are used to encode an ASCII character?
All ASCII character sets have exactly 128 characters, thus only 7-bits are required to represent each character as an integer in the range 0 to 127 (0x00 to 0x7F). If additional bits are available (most systems use at least an 8-bit byte), all the high-order bits must be zeroed.
ANSI is similar to ASCII but uses 8-bit encodings rather than 7-bit encodings. If bit-7 (the high-order bit of an 8-bit byte) is not set (0), the 8-bit encoding typically represents one of the 128 standard ASCII character codes (0-127). If set (1), it represents a character from the extended ASCII character set (128-255). To ensure correct interpretation of the encodings, most ANSI code pages are standardised to include the standard ASCII character set, however the extended character set depends upon which ANSI code page was active during encoding and the same code page must be used during decoding. ANSI typically caters for US/UK-English characters (using ASCII) along with foreign language support, mostly European (Spanish, German, French, Italian). Languages which require more characters than can be provided by ANSI alone must use a multi-byte encoding, such as fixed-width UNICODE or variable-width UTF-8. However, these encodings are standardised such that the first 128 characters (the standard ASCII character set) have the same 7-bit representation (with all high-order bits zeroed).
Can break statement be used without any loop?
The Break statement should generally get executed in some loop or switch statement.
The below code will give compiler error.
void main()
{
printf("12");
break;
printf("14");
}
What does the binary number 1011 translates to what decimal number?
The Binary number 1011 = 11
See the related link, Binary Numbers, below this answer.
Difference between source code and target code?
Source code is code written in a programming language, such as C++ or Java. It is designed to be architecture-independent and human-readable. Source code must be converted to object code (aka machine code) before it can be executed. Object code is architecture-dependent and is not easily human-readable (think ones and zeros).
The point of this setup is that you can ensure that code you write in a programming language (source code) can be executed on ANY architecture that has a proper compiler.
What are the examples for evaluative languages?
Procedural languages use the techinque of dividing a given program into a no of procedures(functions). These functions interact by passing values between them. These languages usually do not have object oriented features. Examples are: C, Cobol, Fortan.
All object-oriented programming languages must have the 3 following features?
Abstraction, encapsulation and polymorphismare the three fundamental features of an object oriented programming language.
Why machine language does not require compiler?
There is only one computer language that doesn't require a compiler - machine code. This is the language that the computer processor understands directly without having to be interpreted first. However it is difficult to understand and it is more usual for people to use assembly language.
Difference between user defined function or standard c library?
satandard fuction is pre define fuction like getch(),clrscr(), in c++
and userdefine fuction is self created by use to do a particular work
ex of use definefuction
int add(int a,int b)
{
int c;
c=a+b;
return(c);
};
What is the meaning of speed of computer?
Speed is the magnitude of velocity, or the rate of change of distance.
When a module is executing what happens when the end of the module is reached?
When a module is called, the computer jumps to that module and executes the statement in the module's body. Then, when the end of the module is reached, the computer jumps back to the part of the program that called the module, and the program resumes execution at that point.
End
Where can a person find information about COBOL?
COBOL was originally designed by Grace Hopper and is on of the oldest programming languages. The name stands for Common Business Orientated Language. More information can be found at websites such as Wikipedia.
Delphi is the name of the commercial Integrated Development Environment (IDE) for RAD created by Borland (see www.borland.com). Borland sold out Delphi and other RAD tools in the year 2008 to a company called Embarcadero Technologies which is now focusing on the newer versions of Delphi and other tools.
RAD stands for Rapid Application Development, meaning that common develoment tasks, such as creating user interfaces, have been made much easier. For instance, without RAD you would have to specify XY coordinates for every button and screen element, RAD allows you to drag and drop buttons onto screens using your mouse similar to a Mr. Potato Head.
The programming language in Delphi was Object Pascal, which is similar to the old "Structured" Pascal created by Niklaus Wirth in 1970. Though earlier their was a distinction made between Object Pascal being used as the language of Delphi and Delphi being considered as the IDE for the object pascal language but according to the definition used in the help files in Delphi 7 versions onwards we can see that infact Borland itself rebranded Delphi itself as a language. So, Delphi now becomes a language with a dedicated IDE available for it.
Delphi allows you to create Standard windows programs, ISAPI applications (web applications), Web Services, NT Services, console applications, DLL's, ActiveX controls, and COM objects.
The last version of the software "Delphi" was the Delphi 8 for .NET. After this it become sold as a part of the Borland Developer Studio (or simple BDS) in the versions 2005 and 2006, with the ability to compile for other platforms. At this time, the language stops to calls itself Object Pascal, but Delphi Language instead due the Microsoft .NET Framework support.
There is also a limited-but-free version of the BDS 2006 called Turbo Delphi. Its price is more attractive, but it does not have all the features that your Big Brother has: the languages that it supports aren't integrated, there are separated versions for each language and they can't be installed at the same machine (there is a protection to avoid this). There is another protection that doesn't let you to install additional "features" (Components) in the IDE, but this protection can be removed at a little charge.
The newest version of Delphi as of now is Delphi XE with its launch in 2010 it provides various capabilities to the language. However, there are still certain things missing with Delphi that its competing cousins are having which are - 64 bit support for application development, mobile phone application development and cross platform development to name a few. Though Embarcadero suggests that the Delphi compiler is going to undergo a complete overhaul and restructuring in the coming up releases so people might be seeing 64 bit support in Delphi in not much time. The 64 bit version is promised to be out in the first half of 2011.