answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What are the disadvantages of teaching on a class blackboard?

1. Eye to eye contact is lost while writing.

2. The written material cannot be stored and reused.

3. Advance preparation of material is not possible.

How do you find whether linked list is circular or not?

To determine if a linked list is circular, you can use the Floyd's cycle detection algorithm. This algorithm involves using two pointers moving at different speeds through the list, and if there is a cycle, the two pointers will eventually meet at the same node. If they don't meet and one of the pointers reaches the end of the list, then the list is not circular.

Main deffrent between c and cpp?

The main difference between c and c++ is the concept of 'Object Oriented Programming' (OOPS).

Thus c does not have the benefits of oops like:

1. abstraction

2. encapsulation

3. inheritance

4. polymorphism etc.

Common operation of singly linked list?

Common operations on a singly linked list include insertion (at the beginning, end, or specific position), deletion (from the beginning, end, or specific position), traversal (visiting each node in the list), searching (finding a specific value), and updating (modifying the value of a node).

Is a ruler a line or a line segment?

A ruler is a line segment because it ends at a one point when a line goes on forever.

What are conditional statements?

Conditional statements are used in programming to make decisions based on certain conditions. They allow the program to execute different code blocks depending on whether a condition is true or false. Common conditional statements include if, else, and else if.

Disadvantages of custom written software?

Some disadvantages of custom written software include higher development costs, longer implementation times, potential compatibility issues with other systems, and difficulties in scaling and maintaining the software as business needs evolve.

What is the difference between artificial neural network and hidden Markov model methods?

An artificial neural network is a structure which will attempt to find a relationship i.e. a function between the inputs, and the provided output(s), in order that when the net be provided with unseen inputs, and according with the recorded internal data (named "weights"), will try to find a correct answer for the new inputs. Hidden Markov models, are used for find the states for which a given stochastic process went through. The main difference could be this: In order to use a markov chain, the process must depend only in it´s last state. For use a neural network, you need a lot of past data. After training process, neural networks are capable of predicting next states of the system based only on the last state. In addition, given the ability to measure the prediction error (for example, after actual event, signal or state has happend and was compared to prediction), the neural network is capable of adapting itself and capture online changes in the undergoing process to improve the model of prediction and decrease the estimation error for the next states. Theoretically such approach can eliminate the need in initial training, as the network started from some random model will eventually adapt itself to the actual process it tries to estimate given this feedback error loop and will start to make correct estimations / predictions after a certain amount of steps. In such setup one can assume that neural network can be used when no past data is available at all. In this case neural network build the model of the ongoing process "from scratch" based on the observations in the "online" mode.

Is tablize a word?

Now it is! This is how every word is "invented". Someone like you comes up with a new word to meet a new need, and eventually it finds its way to a dictionary. A dictionary is a follower, but you can be a leader. Good answer. Yes it is a word

How to get an output in inverted commas for example thank you in inverted commas in c progr amming?

To print "thank you" in inverted commas in C programming, you can use the following code:

#include <stdio.h>
int main() {
    printf("\"thank you\"\n");
    return 0;
}

This code will display the output as: "thank you"

How do you find what version of Microsoft Excel you have?

Go to the Help menu and look at the About option which will tell you. The version of Excel you have is linked to the version of Office you have. If you know what version of Office you have, then you know what version of Excel you have.

How do I calculate the position of 12 squares aligned around the edges of a do-decagon?

To calculate the position of the 12 squares aligned around the edges of a perfect dodecagon, you can use the following steps:

  1. Calculate the radius of the dodecagon:

    • The edges of the dodecagon are 576 units long, and the dodecagon is a regular polygon, so the radius can be calculated as:

    • Radius = (Edge Length) / (2 × tan(π/12)) = 576 / (2 × tan(π/12)) ≈ 500.00 units

  2. Calculate the position of the centers of the squares:

    • The squares are 576 × 576 units, so their centers will be 288 units away from the edge of the dodecagon.

    • The centers of the squares will be evenly spaced around the dodecagon, with an angular separation of 30 degrees (360 degrees / 12 squares).

    • The coordinates of the centers of the squares can be calculated using the following formulas:

      • x = (Radius + 288) × cos(θ)

      • y = (Radius + 288) × sin(θ)

    • Where θ is the angle of the square, starting from the positive x-axis and increasing counterclockwise.

Applying these formulas, the coordinates of the centers of the 12 squares are:

  1. (681.40, 1801.21)

  2. (1365.45, 1117.77)

  3. (1365.45, -1117.77)

  4. (681.40, -1801.21)

  5. (-681.40, -1801.21)

  6. (-1365.45, -1117.77)

  7. (-1365.45, 1117.77)

  8. (-681.40, 1801.21)

  9. (0.00, 2000.00)

  10. (1000.00, 1732.05)

  11. (1000.00, -1732.05)

  12. (0.00, -2000.00)

Okay, let's solve this step-by-step:

  1. We have a regular dodecagon with edge length of 576 units.

  2. The dodecagon is centered at (0, 0).

  3. You want to place 12 squares of size 576 x 576 units around the edges of the dodecagon.

  4. The squares should be rotated 30 degrees more than the previous one.

To calculate the position of the centers of the 12 squares:

  1. The angle between each square is 360/12 = 30 degrees.

  2. The radius of the dodecagon is 576 / (2 * tan(π/12)) = 500 units.

  3. The center of the first square is at:

    • x = 500 * cos(0) = 500

    • y = 500 * sin(0) = 0

  4. The center of the second square is at:

    • x = 500 * cos(30 * π/180) = 433.01

    • y = 500 * sin(30 * π/180) = 250.00

  5. Continuing this pattern, the coordinates of the 12 square centers are:

| Square | X | Y |

| --- | --- | --- |

| 1 | 500.00 | 0.00 |

| 2 | 433.01 | 250.00 |

| 3 | 250.00 | 433.01 |

| 4 | 0.00 | 500.00 |

| 5 | -250.00 | 433.01 |

| 6 | -433.01 | 250.00 |

| 7 | -500.00 | 0.00 |

| 8 | -433.01 | -250.00 |

| 9 | -250.00 | -433.01 |

| 10 | 0.00 | -500.00 |

| 11 | 250.00 | -433.01 |

| 12 | 433.01 | -355.o1

The coordinates are rounded to two decimal places, as requested.

What are the advantages of second generation programming language?

Easier to learn: Second-generation programming languages are easier to learn than first-generation languages. They are closer to human language and are more intuitive

How do you post something on the internet?

The first thing you must do is find somewhere to post it. The next thing you need to do is copy and paste it. After that you must save it to documents and then when you go to the website you want to post it on just double click and then it will say paste and then if you click it, it will pop up on the website and ask you if you want to post this image and if the answer yesthen you will click sure if not please click no thanks.

Is there an Example DFA of an ATM?

An example of a DFA that resembles an ATM can be constructed with states representing different transaction phases (e.g., idle, card insertion, PIN entry, transaction processing) and transitions triggered by user inputs (e.g., card swipe, key press). This DFA would validate the sequence of inputs based on the current state to determine if a valid transaction has occurred.

What is Artificial Intelligence and what roles are there for such technologies in business?

Artificial Intelligence is self awareness, sentience in a programmed computer. Such is impossible with digital technology and the limits placed on digital platforms by the relatively miniscule memory capacities available. So, no roles for business.

Is statistics language feature?

Statistics is a branch of mathematics that involves collecting, analyzing, interpreting, and presenting data. It is not a language feature itself, but it is used in various programming languages to analyze and draw insights from data.学statistics is commonly used in fields such as data science, machine learning, and research to make informed decisions based on data patterns and trends.

What are two common features of high level languages?

High-level languages are typically easier to read and write compared to low-level languages. They also offer more abstraction from hardware, allowing programmers to focus on solving problems rather than managing memory or registers.

Is it possible to make a video game from your home computer?

yes

http://www.microsoft.com/express/product/default.aspx to download. The C++ comes with a downloadable dark basic API just for making games. However you will have to learn how to program in C++ to make a game. Also you would need to be able to designed graphics unless you just want a text game. You can find C++ game making tutorials but they usally come in the form of text based games. You could also look up rpg maker xp or just rpg maker. They have easy to use programs to make games.

Who is the inventor of Reverse Delete Algorithm for MST When was this first published?

The Reverse Delete Algorithm for finding the Minimum Spanning Tree was first introduced by Edsger Dijkstra in 1959. He presented this algorithm in his paper titled "A note on two problems in connexion with graphs" which was published in Numerische Mathematik.

Write a program in c which will read a string rewrite it in alphabetical order?

#include<stdio.h>

#include<string.h>

#include<conio.h>

void main()

{

char a[30],temp;

int n=0,j,i;

clrscr();

printf("Enter the string\n");

gets(a);

while(a[n]!='\0')

{

n++;

}

for(i=0;i<n;i++)

{

for(j=0;j<n-i-1;j++)

{

if(a[j]>a[j+1])

{

temp=a[j];

a[j]=a[j+1];

a[j+1]=temp;

}

}

}

printf("The string in alphabetical order is\n");

for(i=0;i<n;i++)

{

printf("%c",a[i]);

}

getch();

}

Is using AssemblyLoad a static reference or dynamic reference?

Dynamic references are constructed on the fly as a result of calling various methods, such as System.Reflection.Assembly.Load. Source: .NET Framework Developer's Guide How the Runtime Locates Assemblies