LLSinfo

Power By Dholu Production

Responsive Ads Here

Tuesday, April 24, 2018

Write a prg to find the mean value of given number using friends functio|C++


#include<iostream>
using namespace std;

class sample
{
    float x,y;
    public:
    float get()
    {
        cout<<"Enter x="<<endl;
        cin>>x;
        cout<<"Enter y="<<endl;
        cin>>y;
    }
    friend float mean (sampleA);
};

float mean(sampleA)
{
    return((A.x+A.y)/2.0);
}

int main()
{
    sample s;
    s.get();
    cout<<"ANS="<<mean(s);
    return 0;
}

Write a prg to implement function overloading and return volume of cube, cylinder, rectangular box|C++


#include<iostream>
using namespace std;

float vol(float);
float vol(float, float);
float vol(float, float, float);

float vol(float a)
{
    return(a*a*a);
}
float vol(float R, float H)
{
    return(3.14*R*R*H);
}
float vol(float L, float B, float H1)
{
    return(L*B*H1);
}

int main()
{
    float x,y,z,o,p,q;
    cout<<"\n Enter value A for cube:";
    cin>>x;
    cout<<"\n Ans:"<<vol(x);
    cout<<"\n Enter value R for cylinder:";
    cin>>y;
    cout<<"H:";
    cin>>z;
    cout<<"Ans:"<<vol(y,z);
    cout<<"\n Enter value L for Rectangle:";
    cin>>0;
    cout<<"B:";
    cin>>p;
    cout<<"H1:";
    cin>>q;
    cout<<"Ans:"<<vol(o,p,q);
    return 0;
}

WAP to illustrate the concept of call by reference|C++


#include<iostream> 
using namespace std;   
void swap(int *x, int *y) 

 int swap; 
 swap=*x; 
 *x=*y; 
 *y=swap; 

int main()  
{   
 int x=500, y=100;   
 swap(&x, &y);  // passing value to function 
 cout<<"Value of x is: "<<x<<endl; 
 cout<<"Value of y is: "<<y<<endl; 
 return 0; 
}

WAP to illustrate the concept of call by value|C++


CODE:
#include <iostream> 
using namespace std; 
void change(int data); 
int main() 

int data = 3; 
change(data); 
cout << "Value of the data is: " << data<< endl; 
return 0; 

void change(int data) 

data = 5; 
}

WAP for function with default arguments|C++


CODE:
#include<iostream>
using namespace std;

float ar(float R ,float Pi=3.14)
{
 return(Pi*R*R);
}

int main()
{
    int r;
    cout<<"To Find Area Of Circle \n Enter The Value Of Redious :";   
    cin>>r;
    cout<<"Area Of Circle Is :"<<ar(r)<<endl;
    return 0;
}

Write a program to implement arithmetic operations using INLINE function|C++



CODE:
#include<iostream>
using namespace std ;

inline int sum(int a,int b)
 {
  return(a+b);
 }
inline int sub(int a,int b)
 {
  return(a-b);
 }
inline int mul(int a,int b)
 {
  return(a*b);
 }
inline float div(float a,float b)
 {
  return(a/b);
 }

int main()
{
 int x,y;
 char n;
 cout<<"Enter values to process \n X=";
 cin>>x;
 cout<<"\n Y=";
 cin>>y ;
 cout<<"Press '+' for Addition \nPress '-' for Substraction \nPress '*' for multiplication \nPress '/' for Division \n Choise Is :"; 
 cin>>n ;
 if(n=='+')
   cout<<"Addition Is :"<<sum(x,y);
  else if(n=='-')
   cout<<"Substraction Is :"<<sub(x,y);
  else if(n=='*')
   cout<<"Multiplication Is :"<<mul(x,y);
  else if(n=='/')
   cout<<"Division Is :"<<div(x,y);
  else
   cout<<"Wrong Input";
 return 0;
}

Monday, April 23, 2018

Write a program to print sum of series 1+3+5+...+N using function|C++

CODE:
#include<iostream>
using namespace std;

int display(int S,int N)
{
 int i;
 cout<<"Series ";
 for(i=1;i<=N;i=i+2)
   cout<<i<<"+";
 cout<<"=" ;
 cout<<S<<"\n" ;
 return 0;
}

int main()
{
 int i,n,sum=0,r;
 cout<<"\t Sum Of 'N' Odd Numbers ";
 cout<<"\n Enter the Value Of N : ";
 cin>>n ;
 a:
 cout<<"\n Press '1' for SUM using 'for loop' \n Press '2' for SUM using 'while loop' \n Press '3' For Display";
 cout<<"\n Your Choice :";
 cin>>r ;
 switch(r)
 {
  case 1 :
       for(i=1;i<=n;i=i+2)
       {
        sum=sum+i;
       }
       goto a;
       break;
  case 2 :
      i=1;
      while(i<=n)
      {
       sum=sum+i;
       i=i+2;
      }
      goto a;
      break;
  case 3 :
      display(sum,n);
      break;
  default :
      cout<<"You Entered Wrong choice";
  }

  return 0;
}

Wednesday, March 21, 2018

How to Hack Someone's WhatsApp Without Their Mobile Phone | Tricks

How to Hack Someone's WhatsApp with Mac Address of the Target Devices Let's See This Artical



In which we will need the MAC address of the target mobile, BusyBox app and Terminal emulator app. You can download both the BusyBox and the Terminal emulator from the Google Play Store. With these three necessities at hand, we can now proceed.

Step 1: Using your smartphone, download, install, and run the BusyBox app. You will be required to create an account.

How to Hack Someone's WhatsApp Without Their Mobile Phone | Tricks
How to Hack Someone's WhatsApp Without Their Mobile Phone | Tricks




Step 2: Take the target mobile phone and obtain its MAC address. Follow these steps to you get the MAC address “Settings> About Phone> Status> MAC Address. Write this address down as you are going to need it.

How to Hack Someone's WhatsApp Without Their Mobile Phone | Tricks
How to Hack Someone's WhatsApp Without Their Mobile Phone | Tricks

Step 3: Launch the Terminal App and type $ su and press "Enter".

Step 4: In the next step, type "$ busybox iplink show eth0" and hit "Enter".
NOTE: If you get a "device not found" message, enter wlan0 instead of eth0 in the spaces provided.

Step 5: In the next step, type "$ busybox ifconfig eth0 hw ether" followed by your MAC address. type your victim's MAC Address XX:XX:XX:XX:XX:XX
NOTE: You have now successfully spoofed your MAC address. You can confirm this by entering the following command "$ busybox iplink show eth0".

Step 6: Launch your WhatsApp and enter the phone number of the target WhatsApp account.

Step 7: Before you can completely hack the victim's WhatsApp you will be required to confirm the hack. In this case, choose call verification.

Step 8: Write down the code that you will receive and enter it into the box provided on your smartphone.

It is simple as that. From this point henceforth, you will be receiving each and every message that leaves and enters the target phone WhatsApp account

Wednesday, January 10, 2018

C++ In HIndi by Kuldeep Chand | E-book

C++ In HIndi by Kuldeep Chand | E-book
C++ In HIndi by Kuldeep Chand | E-book


Table of Contents

1.OOPS and C++ ................................................................................ 11
2.OOPS with C++ ................................................................................ 31
3.Arrays and Strings ..........................................................................154
4.Functions ........................................................................................206
5.Constructors ...................................................................................254
6.Operator Overloading .....................................................................295
7.Inheritance ......................................................................................357
8.Pointers ...........................................................................................428
9.Virtual Functions and Friend Functions ........................................491
10.Exception Handling ........................................................................565
11.Streams and Files ...........................................................................593


C++ Programing - World EBook Library | E-book


C++ Programing - World EBook Library | E-book
C++ Programing - World EBook Library | E-book


Contents

Contents............................................................................ vi
Preface .............................................................................xi
Intended Audience................................................... xi
Structure of the Book............................................... xii
1. Preliminaries............................................................... 1
Programming
A Simple C++ Program
Compiling a Simple C++ Program
How C++ Compilation Works
Variables
Simple Input/Output
Comments
Memory
Integer Numbers
Real Numbers
Characters
Strings
Names
Exercises
2. Expressions .................................................................................17
Arithmetic Operators
Relational Operators
Logical Operators
Bitwise Operators
Increment/Decrement Operators
Assignment Operator
Conditional Operator
Comma Operator
The sizeof Operator
Operator Precedence
Simple Type Conversion
Exercises
3. Statements................................................................................. 30
Simple and Compound Statements
The if Statement
The switch Statement
The while Statement
The do Statement
The for Statement
The continue Statement
The break Statement
The goto Statement
The return Statement
Exercises
4. Functions................................................................................... 45
A Simple Function
Parameters and Arguments
Global and Local Scope
Scope Operator
Auto Variables
Register Variables
Static Variables and Functions
Extern Variables and Functions
Symbolic Constants
Enumerations
Runtime Stack
Inline Functions
Recursion
Default Arguments
Variable Number of Arguments
Command Line Arguments
Exercises
5. Arrays, Pointers, and References.............................................. 65
Arrays
Multidimensional Arrays
Pointers
Dynamic Memory
Pointer Arithmetic
Function Pointers
References
Typedefs
Exercises
6. Classes.......................................................................................... 82
A Simple Class
Inline Member Functions
Example: A Set Class
Constructors
Destructors
Friends
Default Arguments
Implicit Member Argument
Scope Operator
Member Initialization List
Constant Members
Static Members
Member Pointers
References Members
Class Object Members
Object Arrays
Class Scope
Structures and Unions
Bit Fields
Exercises
7. Overloading .....................................................................................115
Function Overloading
Operator Overloading
Example: Set Operators
Type Conversion
Example: Binary Number Class
Overloading << for Output
Overloading >> for Input
Overloading []
Overloading ()
Memberwise Initialization
Memberwise Assignment
Overloading new and delete
Overloading ->, *, and &
Overloading ++ and --
Exercises
8. Derived Classes .................................................................................145
An illustrative Class
A Simple Derived Class
Class Hierarchy Notation
Constructors and Destructors
Protected Class Members
Private, Public, and Protected Base Classes
Virtual Functions
Multiple Inheritance
Ambiguity
Type Conversion
Inheritance and Class Object Members
Virtual Base Classes
Overloaded Operators
Exercises
9. Templates............................................................................................ 170
Function Template Definition
Function Template Instantiation
Example: Binary Search
Class Template Definition
Class Template Instantiation
Nontype Parameters
Class Template Specialization
Class Template Members
Class Template Friends
Example: Doubly-linked Lists
Derived Class Templates
Exercises
10. Exception Handling ...........................................................................188
Flow Control
The Throw Clause
The Try Block and Catch Clauses
Function Throw Lists
Exercises
11. The IO Library.................................................................................... 196
The Role of streambuf
Stream Output with ostream
Stream Input with istream
Using the ios Class
Stream Manipulators
File IO with fstreams
Array IO with strstreams
Example: Program Annotation
Exercises
12. The Preprocessor............................................................................... 218
Preprocessor Directives
Macro Definition
Quote and Concatenation Operators
File Inclusion
Conditional Compilation
Other Directives
Predefined Identifiers
Exercises