How important is the internet in this age of globalization?
The internet has become very important in this age of globalization. The internet is has a wealth of information available. The internet has allowed people from across the globe to be able to communicate with each other. People use the internet daily to work and for education.
What is difference between Near structure and far structure?
We haven't used near and far addressing for well over a decade. It was common in older systems where memory was addressed by segment and offset. For instance, on a 32-bit system we might use 16-bits to address the segment and 16-bits to address the offset within that segment. If we were referring to an offset within the current segment then we'd use a 16-bit near pointer, but if we needed to refer to another segment then we'd use a 32-bit far pointer. Today we use a normalised pointers.
Characteristics of nonlinear data structure?
A database is a collection of data organized in a fashion that facilitates updating, retrieving, and managing the data. The data can consist of anything, including, but not limited to names, addresses, pictures, and numbers. Databases are commonplace and are used everyday. For example, an airline reservation system might maintain a database of available flights, customers, and tickets issued. A teacher might maintain a database of student names and grades. Because computers excel at quickly and accurately manipulating, storing, and retrieving data, databases are often maintained electronically using a database management system. Database management systems are essential components of many everyday business operations. Database products like Microsoft SQL Server, Sybase Adaptive Server, IBM DB2, and Oracle serve as a foundation for accounting systems, inventory systems, medical recordkeeping sytems, airline reservation systems, and countless other important aspects of modern businesses. It is not uncommon for a database to contain millions of records requiring many gigabytes of storage. For examples, TELSTRA, an Australian telecommunications company, maintains a customer billing database with 51 billion rows (yes, billion) and 4.2 terabytes of data. In order for a database to be useful and usable, it must support the desired operations, such as retrieval and storage, quickly. Because databases cannot typically be maintained entirely in memory, b-trees are often used to index the data and to provide fast access. For example, searching an unindexed and unsorted database containing n key values will have a worst case running time of O(n); if the same data is indexed with a b-tree, the same search operation will run in O(log n). To perform a search for a single key on a set of one million keys (1,000,000), a linear search will require at most 1,000,000 comparisons. If the same data is indexed with a b-tree of minimum degree 10, 114 comparisons will be required in the worst case. Clearly, indexing large amounts of data can significantly improve search performance. Although other balanced tree structures can be used, a b-tree also optimizes costly disk accesses that are of concern when dealing with large data sets. Databases typically run in multiuser environments where many users can concurrently perform operations on the database. Unfortunately, this common scenario introduces complications. For example, imagine a database storing bank account balances. Now assume that someone attempts to withdraw $40 from an account containing $60. First, the current balance is checked to ensure sufficent funds. After funds are disbursed, the balance of the account is reduced. This approach works flawlessly until concurrent transactions are considered. Suppose that another person simultaneously attempts to withdraw $30 from the same account. At the same time the account balance is checked by the first person, the account balance is also retrieved for the second person. Since neither person is requesting more funds than are currently available, both requests are satisfied for a total of $70. After the first person's transaction, $20 should remain ($60 - $40), so the new balance is recorded as $20. Next, the account balance after the second person's transaction, $30 ($60 - $30), is recorded overwriting the $20 balance. Unfortunately, $70 have been disbursed, but the account balance has only been decreased by $30. Clearly, this behavior is undesirable, and special precautions must be taken. A b-tree suffers from similar problems in a multiuser environment. If two or more processes are manipulating the same tree, it is possible for the tree to become corrupt and result in data loss or errors. The simplest solution is to serialize access to the data structure. In other words, if another process is using the tree, all other processes must wait. Although this is feasible in many cases, it can place an unecessary and costly limit on performance because many operations actually can be performed concurrently without risk. Locking, introduced by Gray and refined by many others, provides a mechanism for controlling concurrent operations on data structures in order to prevent undesirable side effects and to ensure consistency. For a detailed discussion of this and other concurrency control mechanisms, please refer to the references below. reference http://www.bluerwhite.org/btree/
A computer program must be free of errors before you can execute it?
There are three kinds of errors. One type won't allow the program to compile. One type will make it exit due to error while running. And the last type, the hardest to find, won't cause any problems for the program, but it will cause the program to do something the programmer didn't intend for it to do. These, logic errors, may still exist in a program that seems to run fine.
What are the different programming languages?
There are literally thousands of programming languages - some for special purpuses, some of a more general nature. Some popular languages are the Microsoft dotnet languages (C#, Visual Basic .NET, and others); Java; PHP; Python; and lots of others. You can get more information:
* In the Wikipedia article on "programming language"
* The TIOBE website has been keeping track of the most "popular" programming languages, for the last few years.
What is the differences between a logical error and syntax error?
Answer:
Syntax Error - Occurs when the code isn't formatted or typed correctly. i.e. In python, typing If instead of if because it only recognizes lowercase.
Logical Error - Occurs when there is a fallacy of reasoning. i.e. In python, typing if x < 0 and x > 5. Since a value can't be less than 0 and greater than 5, a logical error will occur.
Answer:
a) Syntax Error
Definition : An error cause by violation of the programming language used.
Symptoms : Code fails to compile (error message from compiler)
b) Logical Error
Definition : An error caused by violation of logic (range, comparison, etc.). This error will NOT crash the program.
Symptoms : Unexpected output
c) Runtime Error/Execution Error
Definition : Any error, normally logical error that cause the program to crash.
Symptoms : Program crashes.
Circular queue in linear data structure?
The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. Advantage of this type of queue is that empty location let due to deletion of elements using front pointer can again be filled using rear pointer.
Each of these nonmetallic elements is related by the fact that each one has an outermost electron shell (valence shell) that is one electron short of being full. That drives these elements to react with any other atoms from which they can borrow that single electron, including themselves. The halogens are all diatomic, meaning they naturally pair up to form two-atom molecules such as F2, Cl2, Br2, etc. (Note: astatine is very rare and should theoretically be diatomic, but it's inconclusive).
C plus plus programming language program for hybrid inheritance?
There's no such thing as hybrid inheritance in C++. Hybrid inheritance implies two or more different types of inheritance but there are really only two types of inheritance in C++ and they are mutually exclusive: single inheritance and multiple inheritance.
A class that inherits directly from one class uses single inheritance.
A class that inherits directly from two or more classes uses multiple inheritance.
The only way to combine these two inheritance patterns is through multi-level inheritance, where a class inherits directly from one or more derived classes. However, whenever we create a derivative, we're only concerned with the base class or classes we are directly inheriting from. The fact they may or may not be derivatives themselves is largely irrelevant from the viewpoint of the derivative. Indeed, the only time we really need to consider one of the lower bases classes is when we need to explicitly invoke a virtual function of that particular class, as opposed to implicitly invoking the most-derived override of that function as we normally would. However, this is really no different to a derived class override invoking its direct base class method.
Virtual base classes are also thought of as being a type of hybrid inheritance, however virtual base classes merely determine which class is responsible for the construction of those classes. Normally, a derived class is responsible for the construction of all its direct base classes, which must be constructed before the derived class can begin construction. In turn, those base classes are responsible for the construction for their own base classes. In this way, derived classes are automatically constructed from the ground up, base classes before derived classes, in the order declared by the derived class.
For example, consider the following hierarchy:
struct X {};
struct Y : X {};
struct Z : Y {};
Z inherits from Y so in order for a Z to exist we must first construct a Y. By the same token, Y inherits from X so in order for a Y to exist we must first construct an X. Thus when we initiate construction of a Z, that initiates construction of a Y which initiates construction of an X.
Now consider a virtual base class:
struct X {};
struct Y : virtual X {};
struct Z : Y {};
The construction sequence is exactly the same as before (X before Y before Z), the only difference is that when we now instantiate a Z, as the most-derived class in the hierarchy it becomes responsible for the construction of the virtual X. Z is also (still) responsible for the construction of a Y, but Y no longer needs to construct an X because a (virtual) X already exists.
Virtual base classes become more relevant in multiple inheritance, where two or more base classes share a common base class:
struct W {};
struct X : virtual W {};
struct Y : virtual W {};
struct Z : X, Y {};
Here, Z uses multiple inheritance from X and Y. Both X and Y use single inheritance from W. Without virtual inheritance, Z would inherit two separate instances of W, specifically X::W and Y::W. But by declaring W as a virtual base of X and Y, the most-derived class, Z, becomes responsible for the construction of W, as well as its direct base classes, X and Y. Neither X nor Y need to construct a W because a W will already exist. Thus X::W and Y::W now refer to the same instance of W.
Note that we do not need to write any additional code for this mechanism to work. The virtual keyword alone is all we need. Even if X or Y provided explicit initialisation of W, those initialisers would be ignored by the compiler since initialisation of W is automatically the responsibility of the most-derived class. The only time those explicit initialisers would be invoked is if we explicitly instantiate an instance of X or Y, because then X or Y become the most-derived class.
Stacks are primarily used in backtracking algorithms. Any task where elements have to be processed in the reverse order they were encountered requires a stack. Function calls are an example. In order for every function to successfully return to its caller, a stack (known as the function call stack) is utilised. When a function call is made, the return address of the caller is pushed onto the stack and when the function is ready to return, that address is popped from the stack and control returned to the caller.
What are the three views of a sketch or drawing that are required to an object?
Isometric, Orthographic and Perspective, but perspective is not required to depict an object.
Write a programe for calculating the area of circle in C programming?
#include
#include
#include
using std::cout;
using std::cin;
using std::endl;
using std::setw();
int main()
{
const double PI = 3.14153;
double radius = 0.0;
cout << "Enter radius of circle: ";
cin >> radius;
unsigned short precision = 5;
cout << endl <<"Enter precision you want have (not more than 6 digits): ";;
cin >> precision;
cout << setw(precision) < system("PAUSE"); return 0; }
Optical media.
What system enables people to produce offspring?
The reproductive system also known as genital system is a system that enables people to produce offspring. Many non-living substances like hormones, pheromones and fluids are also essential accessories to the reproductive system.
What are the different reserve words in c-language?
Reserve words, also known as keywords are words whose meaning are already defined by a compiler. C language has a total of 32 reserve words. Short, union, else, for, goto, unsigned, enum, extern, char, continue, switch, struct, typedef are some examples.
Why was the binary code invented?
There is no record of when binary was first used. Given that the ancient Mesopotamian architects were using sexagesimal (base 60) they would have already known about binary encodings. However, it wasn't until India introduced the positional notation system that we use today (the Hindu-Arabic system) that we finally had a method of notating all bases in a common and consistent format. By the time Babbage invented the earliest computers, binary encoding was already a well-established method of digitising data to be processed by a machine.
Which of the fastest sorting algorithm?
There is no single algorithm that is ideally suited to every type of sort. If all the data will fit into working memory, then you have a choice of algorithms depending on the size of the set, whether the sort should remain stable or not and how much auxiliary memory you wish to utilise. But if data will not fit into working memory all at once, your choice of algorithm is more limited.
Stability relates to elements with equal status. When the sort is stable, equal elements remain in the same order they were originally input while an unstable sort cannot guarantee this. Stable sorts are ideally suited to data that may be sorted by different primary keys, such that the previous sort order is automatically maintained. That is, if data may be sorted by name or by date, sorting by name and then by date keeps the names in the same order (by date). With an unstable sort, even if you keep track of secondary keys there is no guarantee the secondary or tertiary keys will maintain order.
For small sets of data that will easily fit into memory, an insertion sort offers the best performance with minimal auxiliary storage. This is a stable sort that can be done in place.
For larger sets, a quicksort offers the best performance but is unstable. However, stable versions exist at the cost of performance. Since the algorithm divides the set into smaller and smaller unsorted sets (where each set is in the correct order with respect to the other sets), switching to insertion sort to sort the smaller sets improves overall performance.
For disk-based sorting, merge sort is generally the most efficient. It utilises multiple disks and is stable.
it is a type of a function that is used to get output from the user that is always
used to keep a record of a well known idea thar are captured in the mind of the students in the school as well as the students in their life of real
What is the utility of floating point representation of numbers?
A floating point number is, in normal mathematical terms, a real number. It's of the form: 1.0, 64.369, -55.5555555, and so forth. It basically means that the number can have a number a digits after a decimal point.
To decide whether given processor is using little endian format or big endian format?
There are n no. of ways for determining endianness of your machine. Here is one quick way of doing the same.#include <stdio.h>
int main()
{
unsigned int i = 1;
char *c = (char*)&i;
if (*c)
printf("Little endian");
else
printf("Big endian");
getchar();
return 0;
}
In the above program, a character pointer c is pointing to an integer i. Since size of character is 1 byte when the character pointer is de-referenced it will contain only first byte of integer. If machine is little endian then *c will be 1 (because last byte is stored first) and if machine is big endian then *c will be 0.
Interrupt handling is performed by the operating system kernel. In the Intel IA-32 platform, for instance, it is handled at Ring-Zero.
C++ code does not normally run in the kernel. It runs in user space, such as in Ring-Three. Unless the operating system allows you to load C++ code in non pageable Ring-Zero space, you cannot write C++ programs to handle interrupts. Even if you could do so, all of the dependencies, such as libraries, would need to also be there, unless you wrote dispatch stubs to transition into and out of Ring-Zero non-pageable space.
That said, you are looking for the Device Driver Kit, or DDK. (In the Windows platform.)
What do you call a person who writes algorithms?
If the algorithms are intended to be processed by a machine then they are known as computer programmers. Otherwise they are mathematicians.
main()
{
int age[100],count=0,i;
clrscr();
for(i=0;i<100;i++)
{
printf(" enter the person age %d",i);
scanf("%d",&age[i]);
}
for(i=0;i<100;i++)
{
if(age[i]>=50 && age[i]<=60)
{
++count;
}
}
printf(" no.of persons in the age group 50 to 60 is %d",count);
getch();
}