basics c++, void function, mindset of compiler

 #include<iostream>

using namespace std;
// or use "std::" before cout
/*this
is
a
multiline
comment*/
/*comment is not red by the compiler.
number of spaced lines does not matter in c++*/
int a=9;
void krishna(){
    int a=8;
    cout<<a;
}

int main(){
    int a=5;
    a=7;
    int b=8;
    krishna();
    cout<<a;
    char coding='d';
    cout<<coding;
    double pi=3.14159;
    cout<<pi;
    bool kssk=false;
    cout<<kssk;
    // long int k = 1234567890123456789;
    // int s = 7;
    // int ks = 5;
    // float a = 1.22;
    // // cout<<"the value of k is "<<k<<". the value of s is "<<s<<". the value of ks is "<<ks;
    // cout<<"the value
    // f k is "<< k<<".the value of s is "<<s<<".the value of ks is "<<ks;
    // // cout<<" the value of a is "<<a;
    return 5;
}

Comments

Popular posts from this blog

Function Overloading in C++

oops recall, basic operations and nesting of member functions

OBJECT ORIENTED PROGRAMMING, classes public and private access modifiers (syntax)