This is a c++ programing language lecture part 2
c++ code given below
you need to save this file in .cpp
In the below file name is tut2.cpp
//Types of variables
#include<iostream>
using namespace std;
int glo = 6;
void sum(){
int a;
cout<<glo;
}
int main(){
int glo=9;
glo=8;
// int a = 14;
// int b = 10;
int a=14, b=7;
float pi=3.14;
char c= 'd';
bool is_true = false;
sum();
cout<<glo<<is_true;
// cout<<"This is tutorial 4.\n here the value of a is "<<a<<". \n The value of b is "<< b;
// cout<<"\nThe value of pi is : "<<pi;
// cout<<"\nThe value of pi is : "<<c;
// return 0;
}
This is a image of code |