write a program to swap Two numbers without using temp variable.
Answer Posted / rani
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf ("enter the values to a & b");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("%d%d",a,b);
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What does *p++ do?
What is the difference between a function and a method in c?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
Can you please explain the difference between strcpy() and memcpy() function?
What is difference between scanf and gets?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
How can I find the modification date of a file?
What is the purpose of realloc()?
What do you understand by friend-functions? How are they used?
What is a loop?
What is a null pointer in c?
What is property type c?
What is the difference between single charater constant and string constant?
What does double pointer mean in c?