write a program to swap Two numbers without using temp variable.
Answer Posted / venki
In vb script...............
a=inputbox ("Enter the first value:")
b=inputbox( "Enter the second value:")
msgbox "Before swap a= "&a&" b= "&b
a=cint(a)+cint(b)
b=cint(a)-cint(b)
a=cint(a)-cint(b)
msgbox "After swap a= "&a&" b= "&b
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How can I do graphics in c?
Is c compiled or interpreted?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
What are the characteristics of arrays in c?
What is the purpose of 'register' keyword in c language?
What is the 'named constructor idiom'?
In C language what is a 'dangling pointer'?
write a program to print largest number of each row of a 2D array
Explain how do you print an address?
What is the use of putchar function?
How can this be legal c?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record