What is contiguous storage allocation?
Contiguous means to share an edge or boundary, touching, adjacent, neighbouring and so on. Thus contiguous storage allocation is any allocation that consumes two or more contiguous storage elements. In the case of contiguous memory allocation, this means two or more contiguous memory addresses are allocated. A one-dimensional array is an example of a contiguous memory allocation, where one array element (a data type) is immediately followed by the next.
What is the most important component in a PC system?
The central processing unit, or CPU. But to be useful you also need working memory (RAM), mass storage devices and at least one output device. Input devices are optional in the case of servers.
Why do computers use the binary data?
Technically, they can understand much more. But this requires special software or hardware, which is commonly installed in all modern computers.
But, at it's very heart, most computers are binary. This means 1's and 0's. The reason for this is because the computer is an electrical system. It can only understand 'on' and 'off'.
By combining literally BILLIONS of transistors, each little more than an on/off switch, it is able to produce complex calculations that do all you see today.
What are the major types of high level programming languages?
he High Level Language is basically classified into 3 types namely:
Procedural Language:
The most common high-level languages today are procedure-oriented languages. In these languages, one or more related blocks of statements that perform some complete function are grouped together into a program module, or procedure, & given a name such as "Procedure A." If the same sequence of operations is needed elsewhere in the program, a simple statement can be used to refer back to the procedure. In essence, a procedure is just a mini-program. A large program can be constructed by grouping together procedures that perform different tasks.
Procedural languages allow programs to be shorter and easier for the computer to read, but they require the programmer to design each procedure to be general enough to be used in different situations.
Functional Language:
Functional languages treat procedures like mathematical functions and allow them to be processed like any other data in a program. This allows a much higher and more rigorous level of program construction. Functional languages also allow variables-symbols for data that can be specified and changed by the user as the program is running-to be given values only once. This simplifies programming by reducing the need to be concerned with the exact order of statement execution, since a variable does not have to be redeclared, or restated, each time it is used in a program statement. Many of the ideas from functional languages have become key parts of many modern procedural languages.
Object Oriented Language:
Object-oriented languages are outgrowths of functional languages. In object-oriented languages, the code used to write the program and the data processed by the program are grouped together into units called objects. Objects are further grouped into classes, which define the attributes objects must have.
A simple example of a class is the class Book.
Objects within this class might be Novel and Short Story. Objects also have certain functions associated with them, called methods. The computer accesses an object through the use of one of the object's methods. The method performs some action to the data in the object and returns this value to the computer. Classes of objects can also be further grouped into hierarchies, in which objects of one class can inherit methods from another class. The structure provided in object-oriented languages makes them very useful for complicated programming tasks.
What are the advantages and disadvantages of computer in Fashion Education?
Advantages
Sharing devices such as printers saves money. Files can easily be shared between users. Network users can communicate by email. Security is good - users cannot see other users' files unlike on stand-alone machines. A file server is easy to back up as all the data is stored in one place. A computer allows a person to manipulate data easily and quickly, create text documents, edit them, print them, manipulate images, print them, send text and images over the Internet, download information over the Internet, interact with other people easily from home, keep records of transactions, activities, plan trips, and generally do far more than a person without a computer. Computers are very useful to make everyday life a lot easier. You can check the weather, email, search items, buy things type papers and much much more. You can also play games and post blogs and other stuff. People use computers in many ways. Can be used in business, inventions and scanners.
Computers help children to be in control of their experience, to set their own pace, and to select the level of challenge with which they feel comfortable. Computers help children to use all of their senses to extract information. Computers fascinate kids and can draw their full attention, which often results in a deeper focus and concentration. Computers enable children to learn through creating, just as they gain hands-on knowledge and understanding when they build forts, make up stories, and paint, increase their skills. Good educational software enables children to develop and practice a broad range skill. It can help them learn, for example, about letters, numbers, shapes, colours, and rhythm. Good software can also help children develop their understanding of cause and effect, higher order problem solving, procedural thinking, and creative expression. Today, the wide range of multimedia available for kids in India is really amazing. Computers are helpful because they offer a wide range of functions and services that are not available anywhere else. There are four main uses: word processing, internet/communications, digital video/audio composition, and desktop publishing.
Disadvantages
The teenagers of today's society have changed dramatically due to the Computer. Nowadays, the majority of teenagers have a PC and it has played a key role in their lives. Teenagers need to be equipped with knowledge of computer technology, as most things in life require the use of computers. One disadvantage of owning a computer is the information that students can access from the Internet. The Internet has also made the youth of today quite lazy, especially in terms of their education. If a student needs to research information for school, they merely access a relevant site and download the information, rarely paying attention to what is written. Purchasing the network cabling and file servers can be expensive. If the file server breaks down the files on the file server become inaccessible. Viruses can spread to other computers throughout a computer network. There is a danger of hacking, particularly with wide area networks.
Computers are very engaging on children as well as adults. Kids with access to software that is not age appropriate may be exposed to such negative influences as violence, strong language, and over-stimulation from fast-action graphics.
Can private members of a class be inherited?
All fields and methods of a class are inherited:
public class A
{private int x =10;public int XVal{get{return x;}}}
public class B:A
{public B(){x = 20;}}
We briefly list some of C's characteristics that define the language and also have lead to its popularity as a programming language. Naturally we will be studying many of these aspects throughout the course. * Small size * Extensive use of function calls * Loose typing - unlike PASCAL * Structured language * Low level (BitWise) programming readily available * Pointer implementation - extensive use of pointers for memory, array, structures and functions. C has now become a widely used professional language for various reasons. * It has high-level constructs. * It can handle low-level activities. * It produces efficient programs. * It can be compiled on a variety of computers. Its main drawback is that it has poor error detection which can make it off putting to the beginner. However diligence in this matter can pay off handsomely since having learned the rules of C we can break them. Not many languages allow this. This if done properly and carefully leads to the power of C programming. The standard for C programs was originally the features set by Brian Kernighan. In order to make the language more internationally acceptable, an international standard was developed, ANSI C (American National Standards Institute).
What is an advantage of web based application compared to non web application?
here are the advantages: * Increasing awareness of the availability of a service, product, industry, person, or group. * The possibility of 24-hour access for users. * Standardizing the design of the interface. * Creating a system that can extend globally rather than remain local, thus reaching people in remote locations without worry of the time zone in which they are located.
What are the five steps in programming?
1. Keep your programs simple to understand. do not be afraid to use some complicated if statements in your program. Unless there is a easier way
2. Have your programming documented, up-to-date to the present version of the installed code. 3. In the code use the programming languge's opportunity to comment on your code. Say what a section is for, what it does and why it is done so. 4. Try to avoid hard-coded machine-specific names in your code, so that your program wil be able to run on someone else's machine as well. 5. Remember that other people may not own your fancy combination of hard- and software, so develop your software not on the latest OS or last month's CPU.
Hackers search computers and/or networks for weaknesses. Hackers that exploit these weaknesses are called Black Hats. The ones who try to fix this weaknesses are called White Hats. Grey Hats are both, usually they're White Hat Hackers by day, and Black Hats by night.
Q1 Find the minimum and the maximum number of keys that a heap of height h can contain?
Q1. Find the minimum and the maximum number of keys that a heap of height h can contain.
Advantages and disadvantages of procedural oriented language?
1) In Procedural language the programmers concentration is on problem and its solution so we need another approach where the developpers study the entire system and developped.
---- 2) after writing the programmers 10,000 to 1,00,000 lines of code in proce language they are loosing their control on the code.they cant identify the errors easily. latter if any modifications are there in the code it is difficult to modify.
---- 3) proce lang will not reflect the human beings life.but, o.o.prog'ing lang's reflects the human beings life.like inheritance,encapsulation,objects.......etc
By , James
Progarm to delete previous node in linked list?
struct LinkedListNode
{
void* data;
LinkedListNode* next;
};
LinkedListNode* head;
LinkedListNode* tmp;
while (head)
{
tmp head->next;
free(head);
head tmp;
}
What is sub classing in c plus plus?
Class in C++ is just the same meaning as in any other OO(object-oriented) languages. In the world of OO, anything are classes, which have properties, function to work. In other words, class is a method to organize things to work together.
How do you Assign an address to an element of pointer array?
Pointers were always difficult subject to understand. I would suggest to read several tutorials and spend some time playing with them.
Explanation:
/* create array of two pointers to integer */
int *aaa[2];
/* setting first pointer in array to point to 0x1212 location in memory */
aaa[0] = (int *)0x1212;
/* allocate memory for the second pointer and set value */
aaa[1] = malloc(sizeof(int));
*aaa[1] = 333;
/* if you want to can make first item to point to the second,
now arr[0] pointer address changed to the same as aaa[1] pointer */
aaa[0] = aaa[1];
/* print aaa[1] address and later print value */
printf("LOCATION: %X\n", (unsigned int)*(aaa + 1));
printf("VALUE: %d\n", **(aaa + 1));
/* exact the same here, but different way of how I wrote pointers */
printf("LOCATION: %X\n", (unsigned int)aaa[1]);
printf("VALUE: %d\n", *aaa[1]);
If you would do the same with 0 element of array, which points to 0x1212 memory location you would get some kind of number or Bus error if you accessed restricted memory place (for example the beginning of memory).
I hope this I did not make you more confused than you are.
Second-generation programming language is a generational way to categorize assembly languages. The term was coined to provide a distinction from higher level third-generation programming languages (3GL) such as COBOL and earlier machine code languages. Second-generation programming languages have the following properties:
* The code can be read and written by a programmer. To run on a computer it must be converted into a machine readable form, a process called assembly.
* The language is specific to a particular processor family and environment.
Second-generation languages are sometimes used in kernels and device drivers (though C is generally employed for this in modern kernels), but more often find use in extremely intensive processing such as games, video editing, graphic manipulation/rendering.
One method for creating such code is by allowing a compiler to generate a machine-optimized assembly language version of a particular function. This code is then hand-tuned, gaining both the brute-force insight of the machine optimizing algorithm and the intuitive abilities of the human optimizer.
Advantages and disadvantages of low level language?
Programs written in low level language are executed immediately. They require no compilers.
Low Level Language instructions can be used to manipulate the individual bits in a byte of computer storage.
DisadvantagesAre machine dependentdifficult to program.
Impossible for the programmer to memorize all the operational codes.
Correcting and modifying a program is difficult.
What is message passing explain the advantages of message passing?
message passing is the way of exchanging information between systems or individuals,at d same time.advantage is that we can interact by getting all the necessary details
What is round-robin scheduling?
The term round-robin often refers to something being done to many elements belonging to a group, one element at a time. It is the idea of the task being carried out "one element at a time" that is central here.
What is the Difference between multiple inheritance and multilevel inheritance in java?
Multilevel Inheritance
A Scenario where one class is inheriting/extending the bahavior of another class which in turn is inheriting behavior from yet another class.
Ex: public class Automobile {…}
Public class Car extends Automobile {…}
Public class Ferrari extends Car {…}
This multilevel inheritance actually has no limitations on the number of levels it can go. So as far as java goes, it is limitless. But for maintenance and ease of use sakes it is better to keep the inheritance levels to a single digit number.
Multiple Inheritance
Actually, java does not support multiple inheritance. You can achieve partial multiple inheritance using interfaces but java is not like C or C++ where you can do direct multiple inheritance. However, you can achieve partial multiple inheritance with the help of interfaces.
Ex: public class FerrariF12011 extends Ferrari implements Car, Automobile {…}
And this is under the assumption that Car and Automobile are interfaces.
Here if you see, though you don't inherit concrete code from the Car or the Automobile interface, you do inherit skeleton methods that determine the way your class eventually behaves and hence this can be considered partial Multiple Inheritance.
An array name is a pointer constant?
An array's name is not a constant pointer; it's not even a pointer! An array name is a reference to the array itself. Unlike pointers, references have no memory of their own, therefore a reference cannot be constant (only what it refers to can be constant). A reference is nothing more than an alias for a memory address. Since there is no separate storage for references, you cannot reassign references while they remain in scope. So, in that sense, it behaves like a constant pointer. But a pointer is a variable, so even if declared const, it requires memory of its own in order to store the memory address it points to.
Example:
int a[10];
int * const p = a; // const pointer
assert( *p &a ); would cause an assertion. Likewise, assert( p != &p); proves that p must reside in a separate memory address from that referred to by a. It has to: pointers are variables even when they are declared const.
What are the Real time examples for non linear data structures?
In Systematically search option (Depth First Search), Data storing and retrieving in hard disk based on the "BALANCED TREE(AVL
- B- TREE)", printer (QUEUE),
In Programming language point of with out Data structure and Algorithms we can't develop a single program -
primitive data structures - INTEGER, FLOAT, CHAR , BOOLEAN, ETC..
abstract data structures- ARRAY , LINKED LIST , GRAPH, TREE, STACK , QUEUE. ETC..
So, In programming every where we are using without knowing about this...
try to learn basic thing about programming ....for to become a Good Software Engineer you should know the fundamental of Data Structure and Algorithms.
What are the most important hardware components needed for programming?
That really depends on several factors, one of which is the language you are going to use. There are literally hundreds of programming languages, for different purposes; each has different requirements.
For example, Java is a programming language that works on different platforms - that is, it works on a variety of types of hardware, and operating systems; the most basic thing you need is the (free) JDK (Java Development Kit), which includes the Java compiler and the Java Runtime; and any basic text editor such as NotePad.
What is a feature in c that is not in c plus?
C is a structured programming language which is feature of C which made it a powerful language when it was new in market.
But after C++ was developed structured programming was considered as disadvantage due to development of Object Oriented Programming Language.