answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is an example of an algorithm?

A computer algorithm is any set of instructions that a computer could use to produce a result. An example would be "given a numeric input, multiply that value by 9, divide the result by 5, then add 32." This is how a Celsius temperature is converted into Fahrenheit.

What are the advantages of a pointer variable?

Arrays takes consecutive memory space.

So, if you have 5 consecutive memory blocks free which is consecutive, an error will

occur while creating an array which takes more than 5 blocks of memory.

But if you use pointer, then it don't need consecutive memory blocks all the elements can be placed anywhere in memory.

How do you remove Write Protection from a disc?

it depends on what type of disk if it is a 3.5 inch floppy then there is a tab on the corners that can be moved up or down. if you can see through it , it is write protected if not it can be used.

What high level programming languages are translated by a compiler?

Almost any language can be used to develop a compiler. The first compilers were written in assembly language or machine code but today they are typically written in C or (more commonly) C++. Other languages can be used, however the key aspects of any compiler are speed and efficiency, in which both C and C++ excel.

When one dimensional character array of unspecified length is assigned an initial value?

string[] str= new string[2]{"ss","gg"}

for(int i=0;i<str.length;i++)

{

Response.wrirte(str[i]);

}

What are circular doubly linked lists?

circular linked list is type of linked list used in data structure where address of 1st node is stored in the link part of last node

data1link1 ................... datanlinkn

address1 here linkn=adress1

(node1) (noden)

pratima patwa

Do computer programmers have the knowledge to hack things?

Sometimes yes, sometimes no. Many hackers use pre-scripted tools and have no real understanding of how they work. The hackers who write the tools of course have a pretty good understanding of how viruses work.

How can insert a data into file in c?

You insert data into a file by copying the file to a temporary file up to the point of insertion, then copying the data to be inserted, then copying the balance of the original file. After closing the temporary file you delete the original file and rename the temporary file back to the original file's name.

What programming language uses a set of grammar and rules that specifies how to write instructions?

Every programming language has rules that specify how to write instructions. Many programming languages are similar, but mostly they all have different styles and ways of writing the same instructions. This is called the syntax.

What is the most popular productivity software program?

The Microsoft Windows series of operating systems could be considered the most used computer program as well as Microsoft Office and Microsoft Internet Explorer. While these programs are not "popular," they are the ones used most often by the greatest number of people.

(One contributor notes that an operating system is not a computer program in the sense that the asker probably intended.)

How would you obtain a far address from segment and offset address of a memory location?

Pointers to far objects are stored using four bytes (32 bits). The bytes are stored little endian or low to high order. The first word contains the 14-bit memory offset (bits 14 and 15 are always 0). The second word contains the page number (or segment number for function pointers). The memory address is calculated as follows: Variable Address = (Page * 0x4000L) + OffsetFunction Address = (Segment * 0x10000L) + Offset

Five types of computer?

Answer
  • Category: Super Computers
  • Description: This was the most power full and fastest computers.
  • Size: They are the size of a room
  • Price: Very Expensive Over TRillions
  • Location: They are found in large business markets
  • Advantage: They can process 1 trillion instruction per second. Used in weather forecasting, military simulation and animation movies

  • Category: Mainframe
  • Description: This was the first type of computer.
  • Size: They are notoriously large, normally the size of a closet
  • Price: Very expensive. Can easily exceed a million dollars.
  • Location: They are most likely to be found in large businesses or government centers.
  • Advantage: It can simultaneously work with hundreds or even thousands of people.


  • Category; Minicomputer
  • Description: The second type of computer.
  • Size: Smaller than a mainframe.
  • Price: Anywhere between $20,000 to $250,000
  • Location: Used in smaller and medium sized businesses
  • Advantage: Can service many users.


  • Category: Microcomputer
  • Description: The third type of computer to emerge (ex. desktops, laptops/notebooks).
  • Size: Designed to be small enough for a single person
  • Price: $500 and up.
  • Location: Offices, homes, virtually anywhere.
  • Advantage: Designed for a single user with a multitude of various types of tasks.

1 What are the three basic functional blocks of a computer?

Binary bits. This is 0s and 1s. Everything else is built up from these 0s and 1s to make more human-understandable language.

0s and 1s are used because it is very easy to make clear, definable electrical signals for 0 and 1. It is simply "on" and "off".

What is an external noise?

examples of internal noise.thermal noise,short noise,i/f noise

What is a shell script in computer programming?

A shell program is a program that runs from the computer's command line. Although they were more common in older programs, some people still use them, as the are generally faster and and more minimalist than their graphical counterparts.

What is variable initialization in computer programming?

Well, in languages like C or C++, a variable is just a memory cell. The memory cell can contain any, and then I really mean any, value. For instance, if I were to do something like the following:

int x;

Then I would have no idea what the value of x is, since I did not initialize it. However,

int x = 0;

initializes the variable to be zero.

What are the Circular singly linked list applications in real life?

best example is trains...where each coach is connected to next coach except the engine and the last coach..when we need to add a coach we need to move to the right position and adjust the connecting point suitably!!

How does using the ladder of abstraction in an analysis help?

see where the characters, action, setting, and interpretation all meet.

What is the algorithm for average of three numbers?

int secondmax (int a[], int n)

{

int i, max, second;

for (i=0; i

if (i==0 a[i]>max) second= max, max= a[i];

else if (i==1 a[i]>second) second= a[1];

}

return second;

}

int middle (int a[3])

{

return secondmax (a, 3);

}

What are the importance of computer programming to engineers?

That depends on the type of engineer. To a hardware engineer I suppose a programmer is just the person that handles software. Hardware engineers don't write code.

A software engineer would either design the program for the programmer to code, or do some coding themselves.

Programming would probably be important to a software engineer and nearly irrelevant to a hardware engineer.

What is the grammatical rules governing programming languages?

Language consists of a set of strings (syntactically correct programs) of characters from some alphabet of symbols.

Grammar

-Formal definition of the syntax of the language.

-It naturally defines the hierarchical structure of many PL's.

Source: My CMSC 124 (Design and Implementation of Programming Languages) Teacher