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
to calculate area of the circle
how we use the cin command and why we use this command????
Define Pure Virtual Function? Why & when it is used?
Data is required to be fed into the program (input) and sent out of the program (output). Considering the draughtsman using a CAD station, the input is his commands to cause lines/
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
Define Multi File Program? While writing large programs we must divide programs up into modules. These would be separate source files and the main() function would be in one fi
1. Dene a function chomp :: String -> String that selects a run of repeated characters from the start of a string with the run being as long as possible. For example ch
(Random Numbers) Write statements that assign random integers to the variable n in the following ranges: a) 1 ≤ n ≤2 b) 1 ≤ n ≤100 c) 0 ≤ n ≤9 d) 1000 ≤ n ≤1112 e)
THIS PROGRAM IS TO ADD THE TWO COMPLEX NO.S GIVEN BY THE USER */ #include #include #include struct complex { int real; int imag; }; void main() { clrs
Introduction. In this assignment you are required to revisit the Assignment 1 topic. You will develop a new program which is more sophisticated, in particular, adding more functio
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd