answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

Can a computer run a program's instructions out of order or skip steps?

Yes, but only under certain conditions:

  1. if the program instructions request changing the order of execution or skipping instructions by use of branch type instructions
  2. if external asynchronous events trigger an interrupt
  3. if internal error checks detect a problem (e.g. divide by zero, memory protection violation, stack overflow) in code execution triggers an exception
  4. if the hardware of the computer's CPU implements a feature called "out of order execution" that permits the CPU to determine a more optimal order of execution than the order the instructions actually appear in the code as written; however even with this feature the CPU must produce results identical to those that would be produced without this feature (the only difference allowed is the results are produced faster)

What is the function of pseudo code?

Pseudo code is a way of communicating the structure of an algorithm or program without worrying about particular details of the implementation. Good pseudo code gives the reader all the information he or she needs to actually implement the algorithm, while saving the writer from dealing with any weird particularities of any one language.

For example:

Lets write a function which search a list for a value in pseudo code:

recursiveSearch(List l, Value v):

for each value in l:

if value v){

return l[i];

}

}

}

Hopefully its clear that the pseudo code version is easier to parse while reading (except maybe for some C gurus out there) and can be easily translated into any programming language, while the second is more obscure.

What are the characteristics of DSS?

Unlike other types of information systems, the purpose of a DSS is specifically to help managers make decisions. A DSS supports individual managers and groups of managers at all levels of management in an organization.

What is a programmable timer?

A programmable timer usually just means a timer that can be programmed to go off at any time.

What is Dynamic reallocation?

This involves allocating and de-allocating memory at run-time. Look into the new and delete operators for C++ or malloc and free for C.

What command line tool fixes the OS boot record?

In Windows XP and before you can use the command "fixmbr" from the recovery console to do this. In Windows Vista and later, you need to execute "bootrec.exe /fixmbr".

All commands like percent userprofile percent?

Variable Default value:

Windows XP Default value:

Windows 7/2008 %ALLUSERSPROFILE% C:\Documents and Settings\All Users C:\ProgramData %APPDATA% C:\Documents and Settings\{username}\Application Data C:\Users\{username}\AppData\Roaming %CommonProgramFiles% C:\Program Files\Common Files C:\Program Files\Common Files %COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files C:\Program Files (x86)\Common Files %COMPUTERNAME% {computername} {computername} %COMSPEC% C:\Windows\System32\cmd.exe C:\Windows\System32\cmd.exe %HOMEDRIVE% C: C: %HOMEPATH% \Documents and Settings\{username}\Users\{username} %LOCALAPPDATA%

N/A

(but can be manually added LOCALAPPDATA=%USERPROFILE%\Local Settings\Application Data)

C:\Users\{username}\AppData\Local %LOGONSERVER% \\{domain_logon_server} \\{domain_logon_server} %PATH% C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem;{plus program paths} C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem;{plus program paths} %PATHEXT% .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH; .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH; .MSC %ProgramData% N/A C:\ProgramData %ProgramFiles% C:\Program Files C:\Program Files %ProgramFiles(x86)% 1 C:\Program Files (x86) C:\Program Files (x86) %PROMPT% Code for current command prompt format,usually $P$G

C:> Code for current command prompt format,usually $P$G

C:> %PSModulePath% N/A %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\ %Public% N/A C:\Users\Public %SYSTEMDRIVE% C: C: %SYSTEMROOT% C:\Windows C:\Windows %TEMP% and %TMP% C:\Documents and Settings\{username}\Local Settings\Temp C:\Users\{Username}\AppData\Local\Temp %USERDOMAIN% {userdomain} {userdomain} %USERNAME% {username}{username} %USERPROFILE% %SystemDrive%\Documents and Settings\{username}%SystemDrive%\Users\{username} %WINDIR% C:\Windows C:\Windows

How do you create PC stuff?

It depends... what kind of PC stuff?

(Landonbr: Like not the computer itself, but like learning like how to make games, website, ect. that was what kind.)Oh, OK. Well, if you want to make beginner games, you can download Game Maker (search it up on Google), which is free. As for Websites, use Freewebs. And if you want to improve on a game, which is more advanced, you'd have to buy the game. For example, The Elder Scrolls IV: Oblivion for the PC, you get the Construction Set, which you can make your own levels, place items, etc. Another game like this is Crysis, but don't buy it unless your computer is really good. Both cost money, especially Crysis.

Oh Yeah, and if you want more info, just search this up on google or something.

(Landonbr:Thanks. That DID help, ALOT. I will go to google now, :) )

How do you use a game hacker?

haha good question buddy

there are allot of forms of hacking.

its not simple. Ive had a bit of experience myself, hacking a game called Combat Arms. I Used a programme to inject an aimbot, or wall hack into the start up of the game, so it altered what i could do. As i said, there are lots of forms of hacks, but basically its just altering the gameplay, by using some for of pre run code that messes with the usuall game.

Hope this helped?

How does one do agile programming correctly?

It is impossible to fully answer this question as it is a very large subject. Agile is a type of incremental software which relies on the collaboration and teamwork throughout the development of any particular project. All tasks need to be broken down to their basic concepts in order to minimise risks and maximise the advantages of using this system.

Write an Algorithm for towers of hanoi?

#include
#include
void hanoi(int x, char from,char to,char aux)
{
if(x==1)
{
printf("Move Disk From %c to %c\n",from,to);
}
else
{
hanoi(x-1,from,aux,to);
printf("Move Disk From %c to %c\n",from,to);
hanoi(x-1,aux,to,from);
}
}
int main(void)
{
int disk;
clrscr();
printf("Enter the number of disks you want to play with:");
scanf("%d",&disk);
double moves=pow(2,disk)-1;
printf("\nThe No of moves required is=%g \n",moves);
hanoi(disk,'A','C','B');
getch();
}

What is a single license?

A single license is a type of copyright that restricts the use of the program to one computer, or one server. this means that the program cannot be installed for free on different computers. single license is used for more important programs like Microsoft office and Macromedia software.

What Services are needed to program in Linux?

To program in linux, you just have to pick out a programming language, and use your favorite text editor or IDE to start programming.

Most prodominantly, programs are written in C or C++ and can be compiled with the Gnu C Compiler (gcc) or g++

if your program is in an interpreted language, such as perl or python, you just have to make sure you have the interpreter installed.

Where is dragons triangle?

its somewhere in the pacific ocean between the Northern Marianas Island & Japan. I live in the Northern marianas island(SAIPAN). were next to Guam

What is the language in a computer that consists of two digits?

Binary. It is the core of all computers, using only 1s and 0s. For example, a 2 would be 10. Pretty cool, actually. :D

How do you macro in pr2?

You get a screen recorder and 3 other high levels and record you simming once and it does it over and over

What is 25mb?

25MB is 25 megabytes, which is 25,600 kilobytes (kB) or 26,214,400 bytes. A kilobyte is 1024 bytes (210 bytes), while a megabyte is 1,048,576 bytes (220 bytes). A gigabyte (GB) is 1,073,741,824 bytes (230 bytes). And so on for terabyte (TB, 240 bytes), petabyte (PB, 250 bytes), exabyte (EB, 260 bytes), zettabyte (ZB, 270 bytes) and yottabyte (YB, 280 bytes).

Note that 25Mbit is 25 megabits which equates to 3,276,800 bytes because there are 8 bits in a byte. Some conventions just use a lower case b to denote bits, such as 25Mb, however it is best to be explicit when referring to bits. Just to add to the confusion, the International Electrotechnical Commission (IEC) symbols are KiB, Mib, Gib, etc for bytes, and Kibit, Mibit, Gibit, etc, for bits.

What is the exact range of Hounsfield unit?

; Hounsfield unit is a unit used in medical imaging (MSCT ) to describe the amount of x-ray attenuation of each "voxel" in the 3D image. The voxels are normally represented as 12-bit binary numbers, and therefore have 212 = 4096 possible values. These values are arranged on a scale from -1024 HU to +3071 HU, calibrated so that -1024 HU is the attentuation produced by air and 0 HU is the attenuation produced by water.

Algorithm to find whether a number is prime or not?

check if 2 divides the Number

check if 3 divides the Number

check if 5 divides the Number

...

check if any prime numbers less than the square root of the Number divide the Number

If any do, the Number is composite; otherwise the Number is prime.

This is called the Sieve of Erasthenes.

An easy way to check if a prime number divides the Number in base ten (if you don't have a calculator) is to add or subtract 1 or 3 times the prime number to the Number, so that the sum or difference is a multiple of ten (if the prime number isn't 2 or 5). Knock off the zero. If the prime number divides the new number, it also divides the Number; otherwise it doesn't.