void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}

in this code always gives the same result for all case

Answer Posted / mangala pandi p

provided a+b is between the int minimum and int maximum

so the answer is no.

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you tell whether a program was compiled using c versus c++?

620


What is "Hungarian Notation"?

638


What is a structure in c language. how to initialise a structure in c?

610


What is the use of sizeof () in c?

559


How can type-insensitive macros be created?

702






What is the difference between text and binary modes?

649


shorting algorithmS

1804


Give differences between - new and malloc() , delete and free() ?

613


How can you increase the size of a dynamically allocated array?

645


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

1959


What is #include cctype?

581


What are the primitive data types in c?

579


What is function pointer c?

586


write a program fibonacci series and palindrome program in c

633


Explain what standard functions are available to manipulate strings?

613