answersLogoWhite

0


Best Answer

They are not similar. However one is used to write the other so the question is do you write

1) pseudo code with algorithm

2) an algorithm with pseudo code

3) with a pencil

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

Pseudocode is code intended for processing by a human rather than by a computer. It makes use of a combination of natural language (such as English) and commonly understood programming concepts, such loops, if statements, assignments and so on. Pseudocode is used to generalise algorithm implementations without making any assumptions about the underlying hardware or any particular programming language. Programmers can easily translate pseudocode into actual code suitable for processing by a machine.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Neither of them is part of C language. Algorithm is a method to solve a problem; pseudo-code is a way to (kind of) formalize the algorithm, actually it is a mix of plain text and some (fictional) programming language.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Pseudocode is a programming language that is used to demonstrate or convey the implementation of an algorithm or a programming concept using a language that is easy to understand and easy to convert into an actual programming language. Although it shares much in common with languages like BASIC, there is no standard to define pseudocode; it is not a real programming language as such so there are no compilers or interpreters available to convert pseudocode into machine code. However, when programmers from different backgrounds need to share ideas, they will use pseudocode.

For instance, if a C++ programmer wishes to demonstrate how to calculate the factorial of a number to a programmer unfamiliar with C++, they will use pseudocode as a common language:


function factorial (number)

{

if number is less than 2 then return 1;

// otherwise...

return number * factorial (number-1);

}


This is clearly much easier to understand than the C++ version would be:


unsigned factorial (unsigned number)

{

unsigned result = 1;

while (number) {result *= number--};

return result;

}


This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is pseudocode in c language how is it different from algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is c plus plus program use to convert algorithm in to c plus plus program?

You can't convert an algorithm into code. That is the job of the programmer, not the language. Algorithm's are expressed in plain-English and typically use pseudocode to broadly demonstrate the implementation of the algorithm. However, it is the programmer's job to convert these algorithms into working code. Pseudocode isn't a programming language as such, but it uses structures and statements that are familiar to any programmer and can be easily translated into any language. However, pseudocode is not a standard so there are many different ways to present pseudocode to the programmer. Moreover, pseudocode is generalised and is far too generic to be converted directly into any one language, never mind C++, which can take advantage of the underlying hardware to produce more efficient algorithms than would otherwise be implied by the pseudocode alone. Hence the need for plain-English algorithms in conjunction with the pseudocode. Programmer's can process all this information far more easily than any computer can. Even if you could program a converter for one algorithm, there's no guarantee it would work for any other algorithm. The time spent programming an algorithm converter would be far better spent simply translating the algorithm yourself.


How to write algorithm in c program?

Algorithms are created using pseudocode, which is a combination of natural language (such as English) and commonly understood programming concepts. Pseudocode is a machine-independent language, but it is far too abstract for a machine to understand. It is intended for humans only. As programmers, our job is to translate these algorithms into a form the machine can process in order to produce the required machine-dependent code. For this we use programming languages, such as C, C++ and Java. The more abstract the programming language, the easier it is to convert an algorithm into working code. Of all the high-level programming languages, C has the least amount of abstraction, however we can make use of third party libraries to increase the amount of abstraction, or we can use the language itself to create our own abstractions.


How do you write an algorithm to find the number of times a given ITEM occurs in LIST?

You can write any algorithm in any way you like. Many prefer pseudocode or flowcharts, others use prose or more formalized methods. For example, if you wanted to describe an algorithm to count the number of occurrences of a given item I in a given list L, I would propose the following pseudocode: let counter be 0. let the current item C be the first item in list L. while C == valid { if C matches I then increment counter set C to the next item in the list } return counter.


How do you RSA algorithm c?

Perform encryption on the following PT using RSA and find the CT p = 3; q = 11; M = 5


Does every algorithm have a c program?

Yes. More generally, every algorithm (defined as a sequence of finite steps to solve a problem that can be easily understood by a human) can be converted into machine code such that the algorithm can be understood by a machine. The C programming language is just one such method of converting algorithms into working machine code.

Related questions

What is c plus plus program use to convert algorithm in to c plus plus program?

You can't convert an algorithm into code. That is the job of the programmer, not the language. Algorithm's are expressed in plain-English and typically use pseudocode to broadly demonstrate the implementation of the algorithm. However, it is the programmer's job to convert these algorithms into working code. Pseudocode isn't a programming language as such, but it uses structures and statements that are familiar to any programmer and can be easily translated into any language. However, pseudocode is not a standard so there are many different ways to present pseudocode to the programmer. Moreover, pseudocode is generalised and is far too generic to be converted directly into any one language, never mind C++, which can take advantage of the underlying hardware to produce more efficient algorithms than would otherwise be implied by the pseudocode alone. Hence the need for plain-English algorithms in conjunction with the pseudocode. Programmer's can process all this information far more easily than any computer can. Even if you could program a converter for one algorithm, there's no guarantee it would work for any other algorithm. The time spent programming an algorithm converter would be far better spent simply translating the algorithm yourself.


How do you write an Algorithm for a C plus plus Program?

You don't write an algorithm for a C++ program, unless you are documenting the C++ program after-the-fact. The normal procedure is to write the algorithm first, in a language independent fashion, and then translate that stated algorithm into C++ code, or into whatever language you wish.


How to write algorithm in c program?

Algorithms are created using pseudocode, which is a combination of natural language (such as English) and commonly understood programming concepts. Pseudocode is a machine-independent language, but it is far too abstract for a machine to understand. It is intended for humans only. As programmers, our job is to translate these algorithms into a form the machine can process in order to produce the required machine-dependent code. For this we use programming languages, such as C, C++ and Java. The more abstract the programming language, the easier it is to convert an algorithm into working code. Of all the high-level programming languages, C has the least amount of abstraction, however we can make use of third party libraries to increase the amount of abstraction, or we can use the language itself to create our own abstractions.


How do you write an algorithm to find the number of times a given ITEM occurs in LIST?

You can write any algorithm in any way you like. Many prefer pseudocode or flowcharts, others use prose or more formalized methods. For example, if you wanted to describe an algorithm to count the number of occurrences of a given item I in a given list L, I would propose the following pseudocode: let counter be 0. let the current item C be the first item in list L. while C == valid { if C matches I then increment counter set C to the next item in the list } return counter.


How do you write algorith of C programs?

There is no specific Hard and Fast rule for writing algorithm. The normal method is the following: 1. get a problem 2. find or invent an algorithm to solve it 3. implement the algorithm in a programming language (C, for example)


How do you Write a pseudo code algorithm that reads in three values and writes out the result of subtracting the second value from the sum of the first and third values?

"Pseudocode" means you don't use any actual computer language, so you can be quite informal. Just get the general idea. In this case, for instance:Input number to aInput number to bInput number to cresult = a + c - bShow resultYour teacher may have specific requirements for pseudocode; try to incorporate those.


How do you RSA algorithm c?

Perform encryption on the following PT using RSA and find the CT p = 3; q = 11; M = 5


Is there any program to write pseudocode?

Yes, this program is the same as flowchart, pseudo code. http://watts.cs.sonoma.edu/SFC/index.html another option is to use Note Tab Light and the Pseudo code library. http://www.notetab.com/libraries.php?cat=scripting No. Pseudocode is, as the name suggests, not real code. Pseudocode is an abstract concept that is often used in literature to highlight a principle or solution without focussing on the syntax details of a specific computer programming language. For example, one language might make assignments with the '=' operator, another one might require the use of ':=' or '<-'. Other languages might even control assignments in a totally different way, for example by implication such as in stack-oriented programming languages. Some languages might provide an "else if" construct to further diversify the else-branch of an if-clause, while others might use the "elif" keyword, or a different construct. These are syntax details of programming languages, and are often irrelevant when discussing more abstract concepts in a language-independent way. Pseudocode aims to provide an intuitive description. The fact that the reader knows this to be pseudocode means that nobody ought to argue about the position of a semicolon or the use of single versus double quotes; you'd know this is not the real code in any specific language, but probably close for easy implementation at least with functional languages. For example, when describing a general-purpose algorithm to sort items in a sequential list, pseudocode might say if a > b then swap a, b The reader is required to transcode pseudocode into the specific programming language intented (C, Basic, Pascal, Perl, whatever). Pseudocode is often used when describing generic algorithms, such as sort algorithms.


Different parts of c language program?

what are the parts of C language program


Does every algorithm have a c program?

Yes. More generally, every algorithm (defined as a sequence of finite steps to solve a problem that can be easily understood by a human) can be converted into machine code such that the algorithm can be understood by a machine. The C programming language is just one such method of converting algorithms into working machine code.


How can you implement Ricart and Agrawala's algorithm in c?

Ronaldo! 'c' coding of Ricart-agarwala algorithm


What is the different types of language?

c, c++, java