Successfully reported this slideshow.
Your SlideShare is downloading. ×

Cpp Study Jam

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 13 Ad

More Related Content

Similar to Cpp Study Jam (20)

Recently uploaded (20)

Advertisement

Cpp Study Jam

  1. 1. Study Jam
  2. 2. About Us Muhammad Haseeb  GDSC Lead & Alpha MLSA  Web & Python Programmer  SE Student Hassan Ahmad  Team Flutter Lead  Flutter Developer at CodVets  SE Student
  3. 3. Introduction • Developed by Bjarne Stroustrup • General-purpose, Object-Oriented programming language • Templates, Exception Handling, and Standard Template Library • Efficiency, Performance, and Versatility • System Software, Video Games, Desktop/Mobile Application, High-performance scientific and engineering applications
  4. 4. Syntax #include <iostream> using namespace std; int main(){ // Comments cout<<"Welcome to C++“; return 0; }
  5. 5. Variables & Data Types Data Types: Data types are declarations for variables which determines the type & size of data associated with variables  Integer, Floating, Double, Character Variables: The names you give to computer memory locations which are used to store values in a computer program  int myVariableName = 10
  6. 6. Operators • Arithmetic Operators • Assignment Operators • Comparison Operators • Logical Operators
  7. 7. Conditions • If Statements • IF Else Statements • Else If Statements • Ternary Operator • Switch Conditions
  8. 8. LOOPS • For loop • While loop • Do While Loop
  9. 9. Arrays • Arrays are consecutive group of memory consisting of same types. We call the individual variables in an array the elements of array. Each element is identified by an index which denotes the position of the element in the array • The number of elements in an array is called its length. The length of an array is fixed and predetermined; it cannot be changed during program execution
  10. 10. Array Cont.. When declaring arrays, specify Name Type of array Number of elements arrayType arrayName[numberOfElements]; • Examples: int Array1[ 10 ]; float myArray[ 34 ];
  11. 11. To refer to an element, specify • Array name • Position number Format: arrayname[ position number ] • First element at position 0 • n element array named c: • c[ 0 ], c[ 1 ]...c[n – 1] Name of array Position number of the element within array c c[6] - 456 0 7 2 5 0 6 2 1 5 7 8 c[0] c[1] c[2] c[3] c[11] c[10] c[9] c[8] c[7] c[5] c[4]

×