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
What is the difference among a copy constructor and an overloaded assignment operator? Ans) A copy constructor constructs a latest object by using the content of the argument
Explain the Bit Wise Operators? C language has distinction of supporting special operators recognized as bit wise operators for manipulation of data at bit level. These operato
Write a function that has two int parameters num and n, and returns TRUE when the nth bit in num is 1, otherwise FALSE. This function should use the function in the above problem.
overloadstream insertion opertator to display the data of object on the console
Ask question #MA company is rewriting its payroll system to move it from an old mainframe to a distributed mini-computer/PC-based networked setup. No new functionality will be adde
convert BST into sorted doubly linked list
give the coding in c++
What happens if you write following code? string& foo()
Question: (a) Describe what are dynamic pointers. Show their memory representations diagrammatically. (b) Write short notes about pointers in arrays, paying attention on
Aim: To implement a program for following string operations: Length of String. String Concatenation. Substring (provide start index and length) Find character a
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