Lecture 07(Variable Declaration, Definition and Initialization)

Опубликовано: 23 Июль 2026
на канале: Learn computer with professionals
89
1

Variable Declaration, Definition and Initialization
cout and cin Functions in C++.
Simple and easy step by step process
#coding #programmer #programming #coding #education #C++ #programming #software #programmer..
coding Example :
using namespace std;
main(){
//varibale declaration
//to create varibale using data type and name of varibale
//usual memory donot allocate for varibale
extern int number;
//varibale definition
//to create varibale using data type and name of varibale
//memory allocate for varibale
int age;
//varibale initialization
//to create varibale using data type and name of varibale and assign value to varibale
int salary=0;
float price=100.50;
// function cin and cout
// uss double less then simple with all cout and double greater then with cin
// Youtub not allowing me to add angle bracket
cout "Hello student";
cout "\nWhat is your age?";
cin age;
cout "Your age is "age;
//example-2
int marks=0;
cout "\n Enter your FSC Marks ";
cin marks;
cout "Your marks are "marks;
//summary
/*
1. variable declaration
2. variable definition
3. variable initialization
4.cout and cin functions
*/
}