+ 1
Similarities in various programming languages
There are various similarities in many programming languages. Can you state some similarities you might have noticed? If yes, please do!
1 Answer
+ 2
Here are some similarities I noted:
⢠The command/function "echo" is common in Windows command-line (Windows Shell/batch) and P. H. P. (Hypertext Preprocessor). In both of them, it has exactly the same use. However, the syntax is different i. e. In P. H. P., it is
echo "Text"
OR
echo("Text")
, while in Windows command-line, it is
echo Text
.
⢠The commenting method is exactly the same in C++ and P. H. P. i. e. In both of them, single-line comments are written as
// Comment
, while multi-line comments are written as
/*
Comment
*/
.
⢠Both C++ and Java have a 'main' function.
⢠The method of using functions is pretty much the same in P. H. P. and C++.
⢠The 'for' loops work almost the same in C++ and P. H P.
⢠In both C++ and P. H. P., all statements should end with a semicolon.
This list could go on endlessly if we continue researching!