write a program to swap Two numbers without using temp variable.
Answer Posted / naresh
main()
{
int a,b,c;
printf("enter a,b value");
scanf("%d%%d",&a,&b);
c=a^=b^=a^=b;
printf("%d",c);
}
| Is This Answer Correct ? | 67 Yes | 150 No |
Post New Answer View All Answers
Which is better pointer or array?
What is bin sh c?
Explain a file operation in C with an example.
What is union and structure in c?
Why is c not oop?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
Write a code to generate divisors of an integer?
How can you determine the size of an allocated portion of memory?
What do mean by network ?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Can two or more operators such as and be combined in a single line of program code?
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
How do I round numbers?
What is meant by type casting?
How do you list a file’s date and time?