Tuesday

C++ program syntax, pseudo code and algorithm.

(NOTE: During the time when you study about C++ program your focus must be only on the concept.)




Syntax :-

             The word syntax describes the way in which something is written down or typed on the computer. Now for sometime forget about the C++ program. Initially it is compulsory to make the idea of syntax clear because this term will be used again and again.
                                                                           And it is also said that it is the set of rules, principles and processes which are to be implemented and if these are neglected then the task will not be declared correct. Similarly it works in our programs and important as well. It means without it program is not program but just a pseudo code. And the term syntax is not restricted to Programming language but is also used in many other fields. There are many types of syntax but as it's types are not part of the topic so you must save yourselves to get entangled to study deeply about it.
           

  -:The syntax of C++ program is given below:-                   


#include <iostream>
using namespace std;
                                                                int main ( )
                                                               {
                                                                cout<<"Welcome";
                                                                return 0;       
                                                               }
                    
                                                                                                     As discussed in above paragraph the question arises what is pseudo code? This question can be answered as it is a simple way of of writing down a program or any instruction step by step in simple english or any other language. As our topic is Programming language so we will just stick to writing down program in simple way and in a proper sequence.

                               
                                        If we discuss pseudo code then another thing relevant to it must also be discussed that is Algorithm. So, it's definition is almost similar to pseudo code. It is defined as the step by step process of writing down instructions, but only one point is contradictory between pseudo code and algorithm that is pseudo code is written in simple english or any other language but an algorithm has specified or we can say proper language in which it is written down.






No comments:

Post a Comment