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
I have a program for school and I am not understanding why one of the variables gets skipped or the arithmetic operators aren''t having any effect as I have tryed defining it sever
Explain about the Character Constants in c language? The character constant is a single alphabet and a single digit or a single special symbol enclosed within a pair of single
I''m trying to write a function that prints the substring if it is found in the string, and after it prints it deletes it from the string so i could print the next substring if it
T o k e n : Tokens are small entities in a program. Example: identifiers, keywords, constants, operators, strings, etc. These tokens are used almost in same wa
#questioA Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a str
Define the Classification of Operators in C Language? Depending on the function performed the operator can be classified as 1. Arithmetic Operator 2. Logical Operator 3. Inc
Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.
find the greater of the two variables, without using conditional loops or ternary operators?
In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc
Define pure virtual function or abstract class?
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