What is c++ explain it briefly for beginners

C++ is an object-oriented programming (OOP) language that is viewed by many as the best language for creating large-scale applications. C++ is a superset of the C language. A related programming language, Java, is based on C++ but optimized for the distribution of program objects in a network such as the Internet.

C++ is one of the world's most popular programming languages.

C++ can be found in today's operating systems, Graphical User Interfaces, and embedded systems.

C++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs.

C++ is portable and can be used to develop applications that can be adapted to multiple platforms.

 

C++ is a popular programming language introduced by john straw storm in the year 1979. It is a general purpose case-sensitive language and it is called pre-compiled language. It contains both features of high level and low level language. C++ supports procedural programming and functional programming as well. There are different types of data type that acts as a keyword which is responsible to define a variable. The syntax of strings contains a collection of characters surrounded by double quotes, for example here string is the type STR is the name of the string and coffee is the value that is assigned to the string. For loop is the repetition control structure that allows us to repeat a block of code for a fixed number of times instead of repeating the same code again and again. Another type of loop is while loop are used in c plus are a group of statements that are designed to perform a specific task. Functions in c and c plus allow us to write a code inside the function, then we can use that code every time when we need it by mocking the function.

We have to use if condition because we want to find the even elements and the odd elements and for that we have to include if condition, so we'll write if array of i mod 2 that is if an element on dividing by 2 gives 0 as a remainder then it will, it is an even element, so we'll increment the even variable this which we have written 0 will increment over here okay so in this question we have used array for loop and if else so now let's try some other example. We will print the elements from 1 to 20 using while loop and with the help of function, so firstly we'll start with intermittent and inside int main will simply call or invoke the function by writing the name of the function print function. In order to give some space between each element while printing, we have used double quotes with the space between them. Get line c in is used to take the input of a string and s is the name of the string. Now we will print another message saying that you have entered now here we'll print the string so next line and then okay now we'll do some operations like s dot pushback this will add an element at the end of the String. There are some more examples on each of these topics we have covered.

Enjoyed this article? Stay informed by joining our newsletter!

Comments

You must be logged in to post a comment.

About Author