answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is the advantages of orthographic projection?

1) Some training is necessary before you can draw or read a drawing.

2) Sometimes it's easier to draw the object in perspective view (pictorial view), especially for clients who have difficulties interpreting orthographic drawings.

What are the two types of peopleware?

Well honey, there are two types of peopleware: the ones who can't live without their morning coffee and the ones who are perpetually late to every meeting. Just kidding! In the world of software development, peopleware refers to both the users and the developers who create and maintain the software. So, to answer your question, the two types of peopleware are the end-users and the software development team.

Write an algorithm that can find the maximum of n numbers?

#include void main()
{
int a[10] = { 4, 55, 65, 73, 87, 99, 45, 454, 4353, 243}; int i, j, k, l; for ( j = 9, i = 1, k = 5, l = 6; i <= 2, k >= 3, l<= 7, j >= 8 ; i++, j--, k--, l++)
{

if (a[0] < a[i])
{
a[0] = a[i];
}
if (a[0] < a[j])
{
a[0] = a[j];
}
if (a[0] < a[k])
{
a[0] = a[k];
}
if (a[0] < a[l])
{
a[0] = a[l];
}
} printf("highest number = %d", a[0] );
}

How can techniques of representing and communicating algorithms be improved?

Techniques for representing and communicating algorithms can be improved by using standardized notations such as pseudocode or flowcharts to make them more easily understandable across different platforms and languages. Additionally, providing clear and concise explanations of the algorithm's purpose, inputs, outputs, and steps can enhance comprehension. Utilizing visual aids, such as diagrams or animations, can also help in illustrating complex algorithms in a more intuitive manner.

What are the advantages of a a compiler over an interpreter b an interpreter over a compiler?

Compilers and interpreters do similar jobs, but there are differences:


To run a program you've written, eg in JAVA, it must first be translated into machine code so the computer can read it. This is what compilers and interpreters do.

However, compilers convert the code all at once, save it, then run it; whereas interpreters translate the code one line at a time, as it is run.


Interpreters tend to result in faster translating of code so they are used mostly for debugging. This is because if you used a compiler, you'd have to re-compile your entire project every time you changed one little thing.

However, it's not very efficient to keep re-translating your code once you've finished writing it, because it would waste CPU time. Because of this, once code is done, it is normally compiled so that it runs faster and takes up less space. Another advantage of this is that your code is then much harder to copy without lengthy 'reverse engineering.'

What are overflow and underflow conditions in stack?

A stack overflow occurs when the on--chip stack capacity is exceeded. This can be detected by a comparison of the top-pointer, the last-pointer and the index specified for a create-frame operation ( for push). Initially the top-pointer is set to 1 and the last-pointer to 0, placing a dummy element on the stack.

If an index specified for a read access is greater than the number of valid on--chip stack elements, a stack underflowoccurs

Queue overflow results from trying to add an element onto a full queue and queue underflow happens when trying to remove an element from an empty queue.

What is the opposite of primitive?

The opposite of primitive is advanced or sophisticated. Primitive refers to something basic, undeveloped, or in its earliest stage of existence. In contrast, advanced denotes a higher level of complexity, refinement, or progress in a particular field or context.

Who invented gif?

Steve Wilhite, a software engineer, is credited with inventing the Graphics Interchange Format (GIF) in 1987. Despite the ongoing debate on how to pronounce it (spoiler alert: it's "jif," not "gif"), there's no denying that Wilhite's creation has become a staple of internet culture. So, give credit where credit's due, folks!

Write a program in java to print prime factors of a number?

import java.io.*;

class PrimeFactors

{

private boolean prime(int a)

{

boolean b=true;

for(int i=2;i<=(a/2);i++)

{

if(a%i==0)

b=false;

}

return b;

}

protected static void main()throws IOException

{

BufferedReader in=new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter the Number: ");

int a=Integer.parseInt(in.readLine());

PrimeFactors o=new PrimeFactors();

System.out.println("Prime Factors of "+a+" are::");

for(int i=1;i<=(a/2);i++)

{

if(a%i==0)

{

boolean b=o.prime(i);

if(b==true)

System.out.print(i+" ");

}

}

}}

Is it true that if you are good at mathematics and you enjoy mathematics and think very logically you can do programming?

I think so because my brother in law is computer scientist and he says that if you are good at mathematics so programming will be easy to learn for you.

1 to many relation?

Here is an example from Microsoft: Each customer can have many orders but each order belongs to a single customer. In relational database terminology, this is referred to as a one-to-many relationship.

How do you find the LCM of 10a6c8 2a7c8 15a8c8?

Factor the coefficients.

2

2 x 5

3 x 5

Combine the factors, eliminating duplicates.

Select the higher powers of the variables.

The LCM is 30a8c8

What is the pattern rule for pattern 35-21-1-13-15-34?

One possible rule is:

Un = (219n5 - 3755n4 + 24075n3 - 70645n2 + 92166n - 36960)/120

for n = 1, 2, 3, etc

Some equilateral triangles are not isoscles?

They are both different types of triangles one has 3 equal sides and the other has 2 equal sides.

How many sides are there in a die?

A standard six-sided die has six sides, as the name suggests.

However, dice can have four or more sides; the term die(or dice) does not imply a particular number of sides.

Some board games include dice with unusual shape and a number of sides different from six. Mathematicians also often conduct thought-experiments based on a notion of n-sided dice.