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
How can you tell whether a program was compiled using c versus c++?
What is "Hungarian Notation"?
What is a structure in c language. how to initialise a structure in c?
What is the use of sizeof () in c?
How can type-insensitive macros be created?
What is the difference between text and binary modes?
shorting algorithmS
Give differences between - new and malloc() , delete and free() ?
How can you increase the size of a dynamically allocated array?
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]
What is #include cctype?
What are the primitive data types in c?
What is function pointer c?
write a program fibonacci series and palindrome program in c
Explain what standard functions are available to manipulate strings?