answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is a binary digit?

A synchronous or asynchronous stream of signal consisting only of zero(no voltage) and one(position voltage) is called binary data stream. They may be bytestream, wordstream and so on.

Sending unique binary pulses periodically create a binary digital signal.

For example, you want to pass the number 346F5A through binary digital signal it will be 001101000110111101011010

Break it

0011-0100-0110-1111-0101-1010 you will find the binary equivalents of each digit.

This example is very simple. Usually complex form of data are sent to and fro through data lines, be it the SATA cable of your hard drive, the USB port or the Internet.

How much do programmers make?

  • Free-lance programmers might charge anywhere between $20 or $30 an hour to $200 or $300/hour. It depends on their experience, the industry of their clients, what their specialty is, their location, etc., etc.
  • According to the U.S. Department of Labor, the 2002 median annual earnings of salaried computer programmers was $60,290. The middle 50 percent earned between $45,960 and $78,140 a year. The lowest 10 percent earned less than $35,080; the highest 10 percent earned more than $96,860.
  • According to the National Association of Colleges and Employers, starting salary offers for graduates with a bachelor's degree in computer programming averaged $45,558 a year in 2003.
  • According to Robert Half International, a firm providing specialized staffing services, average annual starting salaries in 2003 ranged from $51,500 to $80,500 for applications development programmers/analysts, and from $55,000 to $87,750 for software developers. Average starting salaries for mainframe systems programmers ranged from $53,250 to $68,750 in 2003.
  • Ask someone at the reference desk of your local public library for the Occupational Outlook Handbook. It lists all kinds of information you would need to know,(including the salary) of just about any occupation you can think of.
  • They make around 200k to 500k a year. This is if the programer is well experienced and has all his certificates.
  • Quite a lot. About forty to eighty thousand on average, and depending on where you work, over a hundred thousand (ex. in the NSA).

What is modularity in computer programming?

Every program requires at least one module. While it is possible to write an entire program in just one module, the larger the program becomes the greater the cost in maintenance. That is, whenever we make any changes to that module, the entire program has to be recompiled. By splitting the program into modules, only those modules that have changed need to be recompiled.

Modular code also makes it easier to organise code because each module represents a particular aspect of the program. Ideally each module should be self-contained but there will inevitably be cases where one module is dependant upon another. Indeed, there may be several modules dependant upon the same module. However, this is an advantage rather than a disadvantage because modular code makes it much easier to write re-usable code; code that can be used in more than one program. In this way we do not have to re-invent wheels writing duplicate code, we only need to write the code once and use it wherever and whenever it is required.

What does a count-controlled loop mean in programming?

A condition-controlled loop is one that has an indefinite number of iterations; its opposite is the count-controlled loop. Condition-controlled loops execute until some event occurs, which is usually user-initiated. For example, modern programs run an condition-controlled loop similar to the following:

while(GetMessage(message,hwnd,0,0)) { ... }

This loop continues to execute until there are no messages left (the WM_QUIT message is returned, which has a value of zero).

It is impossible to identify before execution the number of times such a loop will run, except during controlled tests, although you can easily identify what conditions will cause it to terminate.

Difference between insertion sort and bubble sort?

Bubble sort and insertion sort both have the same time complexity (and space complexity) in the best, worst, and average cases. However, these are purely theoretical comparisons. In practical real-world scenarios, insertion sort (or any other sort, for that matter) will almost always be the better choice over a bubble sort.

What is the difference between a personal computer a mainframe computer?

A personal computer is something that a single person (or family) would own and use. It's probably the type of computer you're using to browse this website. Mainframe computers are usually servers of some sort.

A personal computer might cost $500 to $5,000 depending on features, a mainframe might cost $100,000 to $10,000,000 depending on features.

A personal computer is almost always sold outright, rarely are they leased. Many mainframe computers are leased at a monthly rate a small fraction of total price, thus allowing easy upgrade to the next model at a small incremental monthly cost instead of buying a whole new machine outright.

How do you write c plus plus program to insert an element into a binary search tree?

Binary Search is an algorithm that finds an element by successively halving the search space. Typically, pointers are used, one for the beginning of an array, one for the end. Then a midpoint pointer is chosen, and a test is performed. You either find the element, or you discover that the target element is before or after the midpoint. You then adjust either the start pointer or the end pointer and you iterate. When you reach the point where the pointers are out of order, you conclude that the target is not found, and you also know where to insert it. Binary Search is best implemented with an ordered array, because you want to make "random" access to each element. The problem with arrays is that they are typically fixed size, and must be dynamically adjusted when they need to grow, a potentially "expensive" operation. You can also implement a Binary Tree, but there is cost in development and processing. Even trees have issues because, when inserting and deleting elements, you must use a rebalancing algorithm, otherwise the tree might degrade to a linked list, which is not efficient when used as a search space. In C++, it is possible to declare and define a class of elements that you can add to, subtract from, and search. If you do this correctly, you could start with a static or dynamic array, and then upgrade if need be to a binary tree, and then upgrade if need be to a balanced binary tree, all the while without requiring change to the public interface. That is perhaps the most important value of an Object Oriented Language such as C++.

What are the advantages of Program Logic Control?

A Programable Logic Controller is simply a small computer used to control some system such as garden watering systems. They are everywhere. The computer in microwave ovens, television sets, fridges etc are all PLCs. Generally the term is used to describe a computer that doesn't normally interact with a human but just controls something like those things listed above. There are many many more PLCs around the place than computers that humans comminicate with.

How do you write a program in c to compute the power of a number without using the mathh library?

There is a function which can do it for you. You have to include math.h in headers. And then use the function pow(x, y) which returns a value of type double (x and y are double too).
pow(x, y) = x to the power of y.

What is the relation of the robotics and artificial intelligence?

Natural language is essentially the opposite of computer language and code. English is a natural language that has developed naturally over thousands of years while computer code is a artificial construct.

One of the great barriers between humans interfacing with computers (eg. artificial intelligence) is the language barrier. Humans speak a natural language and computers essentially speak computer/machine code. While it would be possible to interface with an A.I. program without it having that ability, it is what prevents mainstream access and ease of use. Keep in mind that true artificial intelligence does not exist as of yet, and true A.I. would most likely develop a natural language of its own. What some consider "A.I." are really just well programmed dictionaries and conditionals. It is that specific limitation that makes current programs unable to communicate in a completely natural way.

Assembly language program to find the largest of series of numbers in 8051?

include irvine32.inc

.data

istno db "enter ist no",0

2nd db "enter second no",0

lagest db "largest no",0

.code

main proc

mov edx,offset istno

call writestring

call readint

call crlf

mov bx,ax

mov edx,offset 2nd

call writestring

call readint

call crlf

jg loop

loop;

mov edx,offset lagest

call writestring

call writeint

main endp

end main

assembly program to find the greatest of between two numbers is as follows:

Program

MVI B, 30H

MVI C, 40H

MOV A, B

CMP C

JZ EQU

JC GRT

OUT PORT1

HLT

EQU: MVI A, 01H

OUT PORT1

HLT

GRT: MOV A, C

OUT PORT1

HLT

What is use of constructor in object oriented programming?

A constructor creates an Object of the class that it is in by initializing all the instance variables and creating a place in memory to hold the Object. It is always used with the keyword new and then the Class name. For instance, new String(); constructs a new String object. Sometimes in a few classes you may have to initialize a few of the variables to values apart from their predefined data type specific values. If java initializes variables it would default them to their variable type specific values. For example you may want to initialize an integer variable to 10 or 20 based on a certain condition, when your class is created. In such a case you cannot hard code the value during variable declaration. such kind of code can be placed inside the constructor so that the initialization would happen when the class is instantiated.

What is the difference between traditional and object orientation?

A traditional approach, also known as structured system development, includes many variations which aim to develop information using structured and modular programming. On the other hand, an object oriented approach looks at the information system as a collection of objects that work together to accomplish a task.

What language does the computer use and understand?

Dual system 1 and 0

It can also depend what you mean by computer, and how deep you want to go. You can make a "Computer" with wood and strings, as proven by the Jaquard Loom. Hardware is key, no matter how basic. So, in theory (i guess) the Basic Language would be how the computer...works! If you want to go to the very basics.

What are the advantages of a data based system over a file based system?

Advantages of DBMS (Database Management Systems) are followings:

A true DBMS offers several advantages over file processing. The principal advantages of a DBMS are the followings:

• Flexibility: Because programs and data are independent, programs do not have to be modified when types of unrelated data are added to or deleted from the database, or when physical storage changes.

• Fast response to information requests: Because data are integrated into a single database, complex requests can be handled much more rapidly then if the data were located in separate, non-integrated files. In many businesses, faster response means better customer service.

• Multiple access: Database software allows data to be accessed in a variety of ways (such as through various key fields) and often, by using several programming languages (both 3GL and nonprocedural 4GL programs).

• Lower user training costs: Users often find it easier to learn such systems and training costs may be reduced. Also, the total time taken to process requests may be shorter, which would increase user productivity.

• Less storage: Theoretically, all occurrences of data items need be stored only once, thereby eliminating the storage of redundant data. System developers and database designers often use data normalization to minimize data redundancy.

What type of operator can be used to determine whether a specific relationship that exists between two values?

The relational operators: ==, !=, <, <=, > and >=.

p == q; // evaluates true if the value of p and q are equal, false otherwise.

p != q; // evaluates true of the value of p and q are not equal, false otherwise.

p < q; // evaluates true if the value of p is less than q, false otherwise.

p <= q; // evaluates true of the value of p is less than or equal to q, false otherwise.

p > q; // evaluates true if the value of p is greater than q, false otherwise.

p >= q; // evaluates true of the value of p is greater than or equal to q, false otherwise

Note that all of these expressions can be expressed logically in terms of the less than operator alone:

p == q is the same as NOT (p < q) AND NOT (q < p)

p != q is the same as (p < q) OR (q < p)

p < q is the same as p < q (obviously)

p <= q is the same as NOT (q < p)

p > q is the same as (q < p)

p >= q is the same as NOT (p < q)

How can a kid learn computer programming?

Yes. There is no age limit to programming, however unless you are a particularly gifted programmer you are unlikely to find gainful employment in the industry. However, that doesn't prevent you from writing and selling your own programs.

What does compiler mean in programming?

A compiler is a program that converts the language into machine code, also known as binary (1s and 0s). Not all programming languages need compilers. Some are assembly and still others can just be straight and utter machine code.

Maximum value of an array?

The maximum number of elements will depend on the type of array and the available memory. An array of char requires only 1 byte per element but an array of pointers requires 4 bytes per element (8 bytes on 64-bit systems). Arrays of objects or structures would likely require more memory per element.

For all practical purposes, the maximum size is 2,147,483,647 elements, which is the maximum positive range for a 4-byte integer (0x7FFFFFFF). At 1 byte per element, that works out at 2GB.

What is difference Between Vessel Column?

Pressure vessel is designed to withstand circumferential load,known as Hoope Stess, but column takes the axial load.

How do you design a half-adder using NOR gate?

Use 4 NOR gates.

For the 1st NOR gate, inputs should be x' and y

For the 2nd NOR gate,inputs should be y' and x

The outputs of NOR 1 and NOR 2 are taken as inputs of NOR gate 3

The output of NOR 3 is the complemented form of the output required, so, just complement the output of NOR gate 3 with another NOR gate and Viola!, you have your HALF ADDER OUTPUT

PS:I have used a double rail logic, where both x:x' and y:y' are available

What programming language is use to create a website?

At the most basic level is HTML and CSS. CSS is used mostly for the layout and visual design of the website. Usually combined with those is JavaScript. However, more and more websites are using PHP and MySQL. These are becoming more popular and if you ever want to have a website with multiple user accounts that your visitors can log into, PHP is probably the way to go. Might as well start out with it, then add this ability later when you're ready for it.

Function of web based application?

This mean that you can make document without software installed on computer,if you have windows live account,you can make Word document online from any computer,or Excel spreadsheet,onenote notebook