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 / sayantan ghosh
This will never give a result as its call by value and even the values arnt printed in the function so the values in main will only be present
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain how can I make sure that my program is the only one accessing a file?
Write a program to check palindrome number in c programming?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
Where are the auto variables stored?
I need previous papers of CSC.......plz help out by posting them.......
int far *near * p; means
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
What is a dynamic array in c?
What are the back slash character constants or escape sequence charactersavailable in c?
Is calloc better than malloc?
Explain why C language is procedural?
What is identifiers in c with examples?
Explain how are portions of a program disabled in demo versions?