A general-purpose language that can handle both procedural & OOP styles. With its efficient syntax, it's perfect solution for any type of application, big or small.
From basics like data types, loops to advanced concepts like pointers, algorithms, this cheat sheet has everything you need to master C++.
1. Take input from the screen & stores it in a variable. cin >> variable; 2. Prints the output under the “ ” to the screen. cout << "Hello World";
1. Stores characters like ‘A’, ‘a’, ‘1’ etc. char variable_name= 'c'; 2. Boolean variables can either be true or false. boolean b = false;
Reference- An alias for an already existing variable. string variable1 = "Value1"; string &variable2 = variable1; Pointer- A variable holding memory address of another variable. int var = 2, *p; p = &var;
1. Returns the minimum value. cout << min(1, 0); 2. Returns ceil value. cout << ceil(a); 3. Returns a to power b. cout <<pow(a, b);
1. While loop while (condition) { // body of the loop } Do-while loop do { // body of the loop } while (condition);
Step Up Your Game with InterviewBit Web Stories