answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

How does a diode produce light?

When light falls on the junction of a pn junction/diode the potential barrier gets break down due to majorty of electrons flow and they release energy in the form of light.

What is the difference between structure oriented and object oriented programming language?

the main difference is that structured programming deals with the flow of execution, and not, primarily, with the data. The mathematical basis for structured programming has to do with the elimination of arbitrary jumps (GOTOs) in favor of code blocks and functions. In particular, "information hiding" as it relates to data isn't fully developed in structured programming; structured programming has to do with the organization of the code, rather than the data, and pure structured programming passes data around in the form of function arguments (conceptually, "on the stack").

In contrast, object oriented programming primarily deals with data issues. The object/class paradigm promotes clean, flexible organization of data in the same way that structured programming promotes clean, flexible organization of code. In a pure object oriented approach, the flow of program execution is treated as bits of behavior associated with the packets of data that are "objects".

Were did Orville Wright go to school at?

sretaklejhrjrfhsldjfghjgfhfsklgskldhgklgsdgsdfgsfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfggfdhhgfdgfdhgfdhdfghfdghdfghfdghdfhgdfghfdghdfsdfgsdfgsdfgsdfgsdfgsdfgsdhttp://www.ohio-nature.com/image-files/buckeye-tree-nut-lg.jpgfggsdfsdfgsdfgsdfggfhgfdfdghfdghgfdhfdghgfdh sretaklejhrjrfhsldjfghjgfhfsklgskldhgklgsdgsdfgsfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfggfdhhgfdgfdhgfdhdfghfdghdfghfdghdfhgdfghfdghdfsdfgsdfgsdfgsdfgsdfgsdfgsdhttp://www.ohio-nature.com/image-files/buckeye-tree-nut-lg.jpgfggsdfsdfgsdfgsdfggfhgfdfdghfdghgfdhfdghgfdh

Features of structured programming language?

Structured programming language is actually a concept used to improvise the code over common procedural language. Structured programming is somewhat similar to Object Oriented Programming or OOP, which are blocks of code from sub-routines that define a program's functionality.

Here are the features:

· Division of large problems into small procedures and functions

· Absence of Go to statement

· Main statements include If-then-else, call, and case statements

· Inclusion of facilities for declaring entry points and external references

· Extensive set of operators include arithmetic, relational, logical, bit manipulation, shift, and part word operators

Why could programming be a useful skill?

Efficient programming means a lot of different things to a lot of people, and is typically subject to requirements.

For example, for an application intended for use on a very resource limited phone, memory footprint is very important.

On the other hand, many algorithms offer a choice between speed and size: an application with a small memory footprint might need more processing power (or time) to complete a certain task, compared to an implementation that invests into a larger footprint under otherwise comparable circumstances. When both size and speed matter, efficient programming is about finding the perfect compromise.

Software can be efficient in many other ways, too. It can be easy to maintain, it can generate its own documentation based on in-line documentation generation techniques, it can be self-explanatory, and so forth.

While efficient programming means different things to different people and in different circumstances, inefficient programming is almost never the right thing to do. The software design decision, therefore, never is whether to program efficiently or inefficiently; the decision is where to accept inefficiency to some extend in order to boost another aspect of programming.

How do you reverse an array in c?

#include <iostream>

using namespace std;

int main()

{

const int max=26;

char c[max];

int i, j;

// Initialise array with letters of the alphabet (ascending order).

for(i=0; i<max; ++i )

c[i]='a'+i;

// Print array.

for(i=0; i<max; ++i)

cout<<c[i];

cout<<endl;

// Reverse array:

// work from both ends, swapping elements as we go,

// stopping when we reach the middle elements.

for(i=0, j=max-1; i<j; ++i, --j)

// Swap values without using a temporary variable.

c[i]^=c[j]^=c[i]^=c[j];

// Print array.

for(i=0; i<max; ++i)

cout<<c[i];

cout<<endl;

return(0);

}

Output:

abcdefghijklmnopqrstuvwxyz

zyxwvutsrqponmlkjihgfedcba

Why does programmer need variable?

Variables can maintain the same value throughout a program, or they can change values several times, depending on your needs. when you put a variable in a program, the computer recognises the variable and you can change it's value throughout without an error. Note: You can write programs without variables, but their functionality will be quite restricted, like this:

int main (void) { puts ("hello, world"); return 0; }

What are high level programming languages how they differ from assembly languages?

High-level languages are easy to read and write. They are not machine dependent and portable from one computer to another. Assembly languages are machine dependent, easier to read than machine code but it's still not easy to read, and the assembler program translates the assembler program straight into machine code.

Disadvantages of a computer programmer?

People feel like people dont care as much about the job They feel they are not paid enough and they feel like other people dont spend enough time working People feel like people dont care as much about the job They feel they are not paid enough and they feel like other people dont spend enough time working People feel like people dont care as much about the job They feel they are not paid enough and they feel like other people dont spend enough time working

What is the purpose of an input statement?

All results have relationships that support the creation of the result.

Look up "Critical Thinking" in any search engine

An Argument is one of the relationships

Premise statements support the validity of the Argument

Inputs and Outputs are fed into and out of Premise statements to cause a change in the desired result.

This is basically how people solve problems logically, instead of instinctively.

Logic versus Trial-and-Error

List 3 differences between stuctured programming and object oriented programming?

STRUCTURED PROGRAMMING:
  1. Emphasis is on doing things (algorithms).
  2. Large programs are divided into sub programs called FUNCTIONS.
  3. Data moves openly around system from function to function.
  4. Employs top-down approach in program design.
OBJECT ORIENTED PROGRAMMING:
  1. Emphasis is on data rather than procedure.
  2. Programs are divided into to what are known as OBJECTS.
  3. Data is hidden and cannot be accessed by external functions.
  4. Follows bottom-up procedure in program design.

What are the features of a fourth generation languages?

There is no such thing as a fourth generation language.

Machine code is the first generation (the native language of the computer). Assembly language is the second generation (low-level symbolic language). All high-level (abstract) languages are third-generation.

Although some languages claim to be fourth-generation or even fifth-generation, they are meaningless terms used by marketing types that tell you nothing about a language's capability.

What is the difference between artificial and natural intelligence?

One major difference between ANN and biological NN is that the synaptic connections in bio neurons are either excitatory or inhibitory whereas the synaptic weights in an ANN have a range in both positive and negative values..

What purpose do strings serve in programming?

Strings are a type of variable in computer programming.

Simply put, they contain multiple characters which are "strung" together to make a piece of text. "Test", "House", and "Hello World!" are all excellent examples of what might be contained in a string.

As a result, strings are used to store and convey any textual information.

What are the areas and operations of data processing?

Agile Health Insurance makes it simple to choose, compare & apply online for affordable Health Insurance from leading Health Insurance Companies with ObamaCare options, Short-Term Health & Dental Insurance too!

AgileHealthInsurance Categories: Medical, Jewelry, Financial, Insurance

cutt.ly/ijpCS36

Practical application of red black tree of data structure?

Red-black trees are typically used in real-time applications, where worst-case guarantees are vital. Red-black trees often form the basis of other tree structures, including AVL trees and LLRB trees. Computational geometry, scheduling and language dictionaries are other possible applications for RB-based trees. They are also used in functional programming as a persistent data structure.

List 10 high level language?

I have the feeling you could find this on wikipedia, but here's a list to get you started:
Pascal / Delphi
C / C++ / C#
Visual Basic
Flash Actionscript
Java

Depending on the context, Javascript and even SQL could be considered higher level languages.

How can you care for a diskette?

Keep away from sunlight and heat sources, avoid getting dust on the surface (in particular, keeping the slider closed and/or keep the diskettes in their sleeves. Once a diskette is damaged, it cannot be fixed. Make sure regular backups are made of all diskettes.

Advantages and disadvantages of departmental stores?

Advantages:

You can find anything you want in a store that has variety of things. Most departmental stores will have just about anything you're looking for, from clothes, to pharmaceutical products to food. We're living in a fast paced nation where we want to find things fast and get through our bidding quicker. You'll also find many products to be cheaper, for examples Walmart has many products cheaper than most stores although may vary because they can afford to place it to be cheaper because the demand is higher.

Disadvantages:

There's also disadvantages because many products may not be there, especially products that many other foreigners may want to use. Instead they'll probably have to export. Also because departmental stores carry everything many people will go to them causing traffic, parking dilemmas, and long waiting lines.

Economically:

Many people opening little local stores find themselves competing with large departmental stores, which in turn have them only buying what is needed to meet the demand of the people surrounding.

Index of an element in array?

An array is a group of related elements, with a common variable name. The index is a number that indicates the position of an element within an array: the 1st. element, the 2nd. element, etc. (many languages start counting at zero).

What are programs that tell the computer what to do?

All programs tell the computer what to do, that is the primary purpose of programs.

The program (more accurately -set- of programs) which is the mother of all programs & gives the user direct control over the computer is called the "operating system"

What is the difference between signed charcter and unsigned character in c?

In terms of storage there is no difference. A signed int is the same length (in bits) as an unsigned int. The only difference is the range of values that can be represented by those bits. With signed integers, the most-significant bit is used to denote the sign (0 = positive, 1 = negative), so an 8-bit signed char really only has 7-bits to store the value, thus limiting its positive range to [0:127] whereas the unsigned equivalent has the full 8-bits at its disposal so can represent values in the range [0:255].

Another difference is the way in which negative values are physically represented. There are in fact two ways of achieving this depending on the hardware. Older hardware generally uses ones-complement notation, which simply switches every bit. Thus 00101010 (+42) becomes 11010101 (-42). However, since the value zero is neither positive nor negative, we end up with two representations for the value zero (00000000 and 11111111). This also limits the range to [-127:127] for 8-bit signed values. Newer hardware uses twos-complement notation. To switch the sign, we first take the ones-complement as before but we then add 1 and ignore any overflow. Thus 00000000 becomes 11111111 + 1 which is 00000000. This, in turn, increases the negative range by 1, such that an 8-bit signed char now has a range of [-128:127].

Generally speaking, we use unsigned integers whenever we need to represent natural numbers, such as file sizes or array sizes; values that can never be negative. For all other work, we use signed integers.

Note that in C++ a plain char may be signed or unsigned (depending on the implementation), but is not considered the same type as either a signed or unsigned char. They are three completely independent types. Thus a plain char is only guaranteed to represent values in the range [0:127], the ASCII character codes; the only values common to both signed and unsigned char. If you specifically need to represent values outwith this range, such as [-128:127] or [0:255], use an explicitly signed or unsigned char respectively.

All other integer types (short, int, long and long long) are implicitly signed unless you explicitly declare them with the unsigned modifier. Note also that floats, doubles and long doubles are always signed (they cannot be modified).