answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What are the different symbol use in flow chart?

Os fluxogramas utilizam uma variedade de símbolos padrão para representar diferentes tipos de atividades, processos, decisões e fluxos de informações. Esses símbolos facilitam a compreensão do fluxo de trabalho ou processo representado. Aqui estão os símbolos mais comuns usados em fluxogramas:

  1. Oval (Elipse ou Círculo)

Significado: Início ou Fim de um processo.

Uso: Indica onde o processo começa e onde termina.

Exemplo: "Iniciar" ou "Fim".

  1. Retângulo (Processo)

Significado: Representa uma etapa ou atividade do processo.

Uso: Descreve ações específicas que precisam ser executadas.

Exemplo: "Enviar e-mail", "Calcular valor".

  1. Losango (Decisão)

Significado: Ponto de decisão, geralmente com opções como "Sim" ou "Não".

Uso: Representa bifurcações no processo com base em condições ou perguntas.

Exemplo: "Pagamento aprovado?" → "Sim" ou "Não".

  1. Seta (Fluxo ou Conector)

Significado: Indica a direção e sequência do fluxo do processo.

Uso: Conecta os elementos do fluxograma para mostrar o caminho do processo.

Exemplo: Uma seta conectando "Início" a uma etapa seguinte.

  1. Paralelogramo (Entrada ou Saída de Dados)

Significado: Representa entrada ou saída de informações.

Uso: Para ações como receber ou fornecer dados.

Exemplo: "Inserir dados" ou "Exibir relatório".

  1. Círculo (Conector no mesmo fluxograma)

Significado: Conector dentro do mesmo fluxograma.

Uso: Para indicar a continuidade do fluxo em uma área diferente do diagrama.

Exemplo: Usado quando o fluxograma é muito longo e precisa ser segmentado.

  1. Pentágono ou Hexágono (Conector fora do fluxograma)

Significado: Conector para outra página ou outro fluxograma.

Uso: Quando o processo se conecta a outro sistema ou diagrama.

Exemplo: "Continuar no fluxograma B".

  1. Retângulo com Laterais Arredondadas (Subprocesso)

Significado: Representa uma etapa que é detalhada em um subprocesso separado.

Uso: Para simplificar fluxogramas complexos.

Exemplo: "Processar pedido" (detalhado em outro fluxograma).

Esses símbolos são padronizados por organizações como a ANSI (American National Standards Institute) e a ISO (International Organization for Standardization), garantindo que fluxogramas sejam consistentes e compreensíveis universalmente. Ferramentas de software, como Microsoft Visio, Lucidchart e até PowerPoint, geralmente seguem esses padrões.

How do you map the object oriented concept using non object oriented languages?

Object oriented programming doesn't strictly require an object-oriented programming language (although those are generally best suited for the job).

Object orientation, as a concept, means to create logical representations of physical or conceptual items: a vehicle, a person, a manager, etc. Each object type (commonly called a class) has a bundle of attributes (data items, properties) and verbs (methods, functions). These bundles, together, form the class.

It is thus possible to create constructs very close to modern classes as those known in C++ using structures in C. In fact, the first C++ compilers (~20 years ago) translated C++ into C, then used an existing C compiler to generate executable code.

In C, a structure can

  • contain variables (data members)
  • pointers to functions (member functions)
  • pointers to pointers of functions (virtual functions)

Among the many standard object-oriented techniques which can not be modeled in C are

  • privacy through visibility keywords (public, private, protected)
  • inheritance (but a "derived" class can embed the "superclass" for a similar effect)
  • polymorphism
  • contracts (interfaces)
  • operator overloading

That said, object orientation as a design concept does not require an object oriented language.

Write a c program to find out the prime numbers between 1 to 500?

Here is a simple program to generate prime numbers upto a given specific number

/*Prime No. from 1 to 50*/

/*By-Himanshu Rathee*/

#include<stdio.h>

#include<conio.h>

void main()

{

int i,j,n;

clrscr();

printf(" Enter the number upto which we have to find the prime number: ");

scanf("%d",&n);

printf("\n");

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

{

for(j=2;j<=i-1;j++)

if(i%j==0)

break;

/*Number is divisble by some other number. So break out*/

if(i==j)

printf("\t%d",i);

/*Number was divisible by itself (that is, i was same as j)*/

}

/*Continue loop upto nth number*/

getch();

}

What is a computer program written in English language called?

Pseudocode. However, pseudocode is not a programming language as such. It is a language that a programmer uses specifically to convey the concept of a specific algorithm to other programmers. The language is such that any programmer can easily translate the algorithm into their preferred language. Furthermore, pseudocode does not have to be written in English, it can be written in any language. However, English is the most widely-spoken language within the programming community and is therefore the most prevalent language used in programming.

Who is Delphi owned by?

The Delphi programming language is currently owned by Embarcadero.

Q2 Differentiate between formatted and unformatted you input and output functions?

Formatted I/P functions: These functions allow us to supply the input in a fixed format and let us obtain the output in the specified form. Formatted output converts the internal binary representation of the data to ASCII characters which are written to the output file. Formatted input reads characters from the input file and converts them to internal form.

Format specifications

Data type

Integer

short signed

short unsigned

long signed

long unsigned

unsigned hexadecimal

unsigned octal

%d or %l

%u

%ld

%lu

%x

%o

Real

float

double

%f

%lf

Character

signed character

unsigned character

%c

%c

String

%s

Unformatted I/O functions: There are several standard library functions available under this category-those that can deal with a string of characters. Unformatted Input/Output is the most basic form of input/output. Unformatted input/output transfers the internal binary representation of the data directly between memory and the file

What similarities between analog and digital signals?

ANALOG:continuous,rate of transmission is slow,less reliable 2 transmit,more noise,interference is more

DIGITAL:non continuous,rate of transmission is fast,more reliable 2 transmit,less noise,interference is less

Computer users who are not computer professionals are sometimes called?

Computer users who are not computer professionals are often referred to as "end users" or "casual users." They typically use computers for basic tasks like browsing the internet, using office applications, or consuming media, without having specialized technical skills. In some contexts, they may also be called "lay users" or "non-technical users."

Step form algorithm for making a telephone call to your friend?

Step1. Start procedure

Step 2. Pick up the phone

Step 3. Search for a friend phone number in the contact list

Step 4. Select the number and dail it by clicking the dail button

Step 5. Wiat for the network

Step 6. If connection is successful you will hear the dailer ring tone.

Distinguish between determinate error and indeterminate error?

Indeterminate errors are random errors that randomly fluctuate and cannot be eliminated.

Determinate errors

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.