Posts

Showing posts from May, 2021

check package installation on windows10

Image
 A lot of times we dowload setup of some packages like JDK, mingw etc then we extract the .zip file  & install the package In the end of installation we need to make sure whether the package we installed is now recognized by our PC hence we can use the following commands for checking installation of various packages  Open your command prompt & type following commands g++ --version gcc --version java --version node --version npm --version git --version bash --version wsl --list --version   # to chk linux distribution installed as wsl in our windows PC c++ --version cpp --version

ASCII

Image
ASCII codes As a high level programmer we see our laptop keyboard  as a bunch of keys with character printed on them & some special keys like , that key with windows logo alt key, ctrl key, num-lock etc using ASCII codes,  we  encode all of this character i.e., we assign a bit pattern to each of these character e.g. for  alphabetic character  'A' ≣  65(in decimal)  ≣  1000001(in binary) space        character   '  '  ≣ 32(in decimal)  ≣  0100000(in binary) Now let's run a C++ pgm that prints 'A' there are two alternatives,  we directly initialize a character with 'A' or we can initialize character with 65 #include <bits/stdc++.h> using   namespace  std; int  main(){      char  c1 =  'A' ;      char  c2 =  65 ;     cout << c1 ;     cout << c2;      return   0 ; } g++ --version                // to chk g++ version installed in your windows10 PC g++ -g code.cpp -o code.exe  // to compile code // after compiling code a binar