answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What are arrays in gwbasic?

These are memory locations to store a vast amount of data. Usually a limited no. of variables are handled while programming in GW Basic. Sometimes you need to bother a plenty of variables and this colud make programming tiresome. To save yourself from a lot of manual inputs, Arrays can help you.

What is the HS Code for grinding machine?

The HS Code for grinding machines generally falls under the category 8460, specifically for machine tools for grinding, sharpening, or polishing metal or other materials. The exact code can vary based on the type and specific function of the grinding machine, so it's essential to consult the Harmonized System documentation or a customs authority for precise classification.

What is machine language called and what numerals represent this language?

A machine language is called as machine code and it is represented as binary numbers 0 and 1

What is extreme programming?

Extreme Programming:

Extreme Programming is when you design the test cases first, and then program backwards. This creates an easier to use programming flow.

Write a program in c plus plus to accept the string and then take the starting and ending point from the user and display the sub string through function?

#include<iostream>

#include<sstream>

unsigned input_num (std::string prompt, unsigned min, unsigned max)

{

unsigned num = 0;

while (1)

{

std::cout << prompt << " (range " << min << " - " << max << "): ";

std::string input = "";

std::getline (std::cin, input);

std::stringstream ss (input);

if (ss >> num)

{

if (num >= min && num <= max)

break;

else if (num<min)

std::cout << "Index must be greater than or equal to " << min << std::endl;

else

std::cout << "Index must be less than or equal to " << max << std::endl;

}

else

std::cout << "Invalid input." << std::endl;

}

return (num);

}

void print_substring (std::string input, unsigned left, unsigned right)

{

std::cout << input.substr (left, right - left + 1) << std::endl;

}

int main()

{

std::cout << "Input string:\t";

std::string input = "";

std::getline (std::cin, input);

unsigned left = input_num ("Enter the start index of the substring", 0, input.size()-1);

unsigned right = input_num ("Enter the end index of the substring", left+1, input.size()-1);

print_substring (input, left, right);

}

What does rigid and rule oriented mean?

The origin of orient comes from the latin word oriens to mean rising and therefore indicates the east where the sun rises.

1.orient is a noun to mean countries in the east.

2.oriental is adjective.

3. to orient means to find direction/familiarize

4.oriented is the past participle form: inclination.

5orientation is the noun form to mean introduction/self adapt

6.to orientate is a varient of to orient derived from the noun orientation

7 orienting is the verb to mean directing itself

8 orientate in American usage is substandard form.

What happens if the argument to exec is not executable?

If command is not specified, a non-interactive shell exits, unless the shell option exefail is enabled, in which case if returns failure. Returns if file cannot be executed.

How can you dicribe array?

An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.

An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.

An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.

An array is when you store several data items with a single name. You only use a number to distinguish the individual items. Or two or more numbers, if you use a multidimensional array.

Who Develop the first Software Program?

Lady Ada Augusta Countess of Lovelace wrote programs in 1842-43 for Charles Babbage's Analytical Engine. However as the machine was never built she did not get to run them.

What are the four major stages of compilation in programming?

This actually varies based upon the language as some have less than 4 or more than 4. However I believe you're looking for:

-Preprocessor

-Compile

-Assembler

-Linker

Why is assembly language considered easier for humans to program than machine language?

Assembly is signficantly shorter and easier to remember than the equivilant machine instructions.

Assembly instructions are human readable characters, for which a direct translation exists to the binary machine code instructions.

Pseudo example:

add <- assembly instruction

1010101010 <- machine instruction

Wt is the different between structure and class?

A structure is a different from a class in the sense that a class can represent data elements as well as their associated functions whereas a structure can represent only data elements,, not their associated functions.

Why is analysis of residuals important?

An analysis of the residuals can be used to check that the modelling assumptions are appropriate.

What is the base class for all swing components?

The JComponent class of the javax.swing package serves as the base class.

Who discovered artificial intelligence?

The first actual robot was created in 1961 by Joseph F. Engelberger. It was called the Ternstedt Die-caster and basically dropped car parts made from molten steel into a cooling liquid. The word "robot" is first credited to the acclaimed Czech playwright Karel Capek (1890-1938), from the Czech word for forced labor or serf, in his writings in 1920. However, the concept of "mechanical men" has been around since the mid 1800s. The word "robotics" was first used in Runaround, a short story published in 1942, by Isaac Asimov (born Jan. 2, 1920, died Apr. 6, 1992). I, Robot, a collection of several of these stories, was published in 1950.

How to truncate file in assembly programming?

INT 21h / AH= 3Ch - create or truncate file.

entry:

CX = file attributes: mov cx, 0 ; normal - no attributes. mov cx, 1 ; read-only. mov cx, 2 ; hidden. mov cx, 4 ; system mov cx, 7 ; hidden, system and read-only! mov cx, 16 ; archive

DS:DX -> ASCIZ filename.

returns:

CF clear if successful, AX = file handle.

CF set on error AX = error code.

note: if specified file exists it is deleted without a warning.

example: org 100h mov ah, 3ch mov cx, 0 mov dx, offset filename mov ah, 3ch int 21h jc err mov handle, ax jmp k filename db "myfile.txt", 0 handle dw ? err: ; .... k: ret

What are social variables?

Social variables are those aspects of a person which may well impact on the way in which they answer a question, speak a language's dialect, what accent they have, where they shop, their politics, etc...

Generally speaking Social Scientists insist on "controlling for" (taking account of) the social variables of respondents in order to ensure that their test results and responses from any study's participants are 'valid'

Generally, social variables include (but are not limited to):

-Gender

-Age

-Social class

-Region of origin

-Region of residence

-Occupation

-Salary/income range

-etc...

The reason we Social Scientists control for these variables is that if you were to ask 100 random people whether pre-marital sexual activity was acceptable and of those asked 90 were lower-middle class university students who happened to be male, and the other 10 were female church members for the mid-west of the US, then you're going to get VERY skewed results which would, essentially, invalidate your study.