Skip to content

Latest commit

 

History

History

001_Dec1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

December 1

Increment / Decrement Operator

  1. Increment (++)
  2. Decrement (--)

Assignment

  1. Post and Pre increment/ decrement in c++

Ternary Operator

//syntax of ternary operator

(condition) ? ture statement : false statement;
//program that uses ternary operator


#include <iostream>
using namespace std;

int main() {
  int age;
  string agePar;

  cout << "Enter your age: ";
  cin >> age;

  agePar = (age < 18) ? "Child" : "Adult";
  cout << agePar;
  return 0;
}

Features of OOP

  • Object
  • Class
  • Inhertitance
  • Polymorphism
  • Data Abstraction
  • Encapsulation
  • Flexible