Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Aim: To implement a program to swap two numbers using reference arguments.
Code:
void swap(int *a, int *b)
{
int temp;
temp=*a;
*a=*b;
*b=temp;
}
void main()
int a,b;
clrscr();
cout<<"Program to swap two variables.";
cout<<"\nEnter variables:\nA:";
cin>>a;
cout<<"B:";
cin>>b;
swap(&a,&b);
cout<<"\nSwapped variables:\n\nA:"< cout<<"\nB:"< getch(); } Output: Program to swap two variables. Enter variables: A:5 B:36 Swapped variables: A:36 B:5
cout<<"\nB:"<
getch();
Output:
Program to swap two variables.
Enter variables:
A:5
B:36
Swapped variables:
A:36
B:5
YOU HAVE GIVEN THE MARKED UP PRICE OF 80% AND DISCOUNT PRICE OF 10% THEN FIND THE SELLING PRICE
there is a pebble merchant. he sells the pebbles,that are used for shining the floor.his main duty is to take the length of the room side but he sometines mistakes doing that and m
Class Templates In addition to function templates, C++ also supports the method of class templates. By definition, a class template is a class definition that explains a fam
Public, Private and Protected members: Class members can either be declared in public','protected' or in the 'private' sections of the class. But as one of the features of OOP i
want the codings for these topic in ur experts minds.com
A: Provide a friend operator class Base { public: friend std::ostream& operator ... protected: virtual void printOn(std::ostream& o) const; }; inline std::ostr
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec
A: The procedure of encoding the parameter types along with the function/method name into a unique name is called as name mangling. The inverse procedure is called demangling. F
A: No. (Excluding if you have an old compiler, you might have to force the new operator to throw an exception if it runs out of memory.) This turns out to be a real pain to alwa
For this program, you are going to modify your previous program (program 3) so that it will now have a menu to see if the user wants to read the input from a file or interactively.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd