Skip to main content

Posts

Showing posts from April, 2021

How to start learning Web-development

C++ programming tutorial 5

 Call by value or reference - There are two type in function call by value or call by reference in it we pass the value in call by value we pass value and in call by reference we pass the reference of the value . Call by value in C++ Programming language  :- In call by value we pass the variable or say argument and then it used by function which we made so see the code given below  Syntax - #include <iostream > using namespace std; // making function  void fun_name(int a, int b) { ... } int main() { //calling function  fun_name(int n,int n1); return 0; } Code -  // function call by value in C++ programming #include <iostream> using namespace std; // call by value in function declaration void container(int a, int b); int main() {   int x,y;   cout<<"Enter the value of x :"<<endl;   cin>>x;   cout<<"Enter the value of y :"<<endl;   cin>>y;   // here we passing the value as argume...

C++ programming tutorial 4

  Function in C++ programming - Defination of the function - In function we write a block or a section of code for writing less code or and more use if we write a block of code repeatly then by using function we do not have to requirement to write a block of code repeatly and after make a function we have to call it on that requirement and in one line we run a lots of line of code and run it on the less time and more work this is a function and use of it on the c plus plus programming language Syntax - #include<iostream> using namespace std; // defining function globally void function(){ // writting code here  ... ... } int main() { .. // calling function in main program function(); return 0; } code of the function - #include <iostream> using   namespace  std; // Defining the function void   container ( int  x1,  int  x2){        cout << "value of x1 :" << x1 <...

C++ programming tutorial 3

 Control statement in c++ programming - 1. For loop statement in c++ programming -  In this loops we run a single part of code many times this used for simple our programming and in less code , time work done is same . Syntax - for(int i =0; i< x ; i++){ ..... } Code -  // For loop in c++ language  #include <iostream> using   namespace  std; int   main () {      int   i  ,  a ;      cout << "Loop was start Below " << endl ;      cout << "Enter the value of a:" << endl ;      cin >> a ;      for ( i = 0 ; i <= a ; i ++ )     {          cout <<   "this is a number count :" <<   i << endl ;     }  ...

C++ programming tutorial 2

Control statement in C++ PROGRAMMING - 1. if-else statement :    there are types below of if else statement so they are -     1. if-statement      In this if statement a condition was entered if the condition was match or say what we write in condition on it was true then program was run if it was false then the program in if statement was not run . Syntax - if(Condition){ //code you want to run } PROGRAM - // if-else statement  #include <iostream> using   namespace  std; int   main () {      int   a  ;      cout << "If the entered integer in equal to the condition they it run " << endl ;      cin >>   a ;      if ( a <= 6 )     {          cout << "Program was running" ...

Cpp programming tutorial 1

C++ language - This is a very similar to c language and it have all the concept of c language and their is more in c plus plus it have many new concept like classes and object was introduced here constructor , destructor many more concept was in c plus plus and because c plus plus have more enhancement and more simple to use it also object oriented programming .  OOPs concept with example - The meaning of object oriented programming(oops) is it works on concept of classes and object or in other word oops concept is based on class and object . class is a body to create object in object oriented it treat data as a critical element and decompose the problem in object and build data function according to the object and in object oriented programming we can use it for protecting data and for privacy of data so not all variable can access it . BENEFIT OF OBJECT ORIENTED PROGRAMMING - 1. Because of hiding data method we secure our data and system for accessing all variable . 2. It have...

Funcation in c++ programming example in detail

Friend Funcation- 1. Adding to complex number in friend function #include<iostream> using namespace std; class container { float a,b; public: void get() { cout<<endl<<"Enter value for A="; cin>>a; cout<<endl<<"Enter value for B="; cin>>b; } void disp() { cout<<endl<<a; cout<<endl<<b; } friend container addition(container,container); }; container addition(container X,container y) { container Z; Z.a=X.a+y.a; Z.b=X.b+y.b; return Z; } int main() { container P,Q,R; P.get(); P.disp(); Q.get(); Q.disp(); R=addition(P,Q); R.disp(); return 0; } Output - Enter value for A=12 Enter value for B=12 12 12 Enter value for A=1 Enter value for B=1 1 1 13 13 2.  If class one is friend function of two it not means that two is friend functio...

Basic Structure explanation of c , c++ , html , python with the help of code

  1. Basic structure of c program - #include<stdio.h> // #include<conio.h> int main(){ int a ,b,c; // defining integer here  // simple hello world  printf("hello world"); // use of integer  printf("Enter the value of a -\n"); // printf is use for print any value , sentense etc scanf("%d",&a); // scanf is use for getting integer value  printf("Enter the value of b -\n"); scanf("%d",&b); c = a+b; //we can use any operater here printf("%d",c ); getch(); return(0); } output - hello world enter the value of a = 12 enter the value of b = 12 value of c =24 2. basic structure of c++ program - #include <iostream> // here we explaining header which include the explanation using namespace std; int main() { int a, b, c; //declaring integer cout << "enter the value of a =" << endl; // use for print on output screen cin >> a; // use for getting the value cout <...