How to write a program for swapping two strings without
using 3rd variable and without using string functions.

Answer Posted / sri

main()
{
int a=5,b=3;
a=a+b;
b=a-b;
a=a-b;
printf(" %d %d ",a,b);
getch();
}

Is This Answer Correct ?    33 Yes 42 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sizeof int return?

588


Explain what is the difference between the expression '++a' and 'a++'?

623


What is the difference between a string and an array?

703


How can my program discover the complete pathname to the executable from which it was invoked?

658


What is the benefit of using an enum rather than a #define constant?

655






The difference between printf and fprintf is ?

715


in iso what are the common technological language?

1631


Write a program on swapping (100, 50)

634


What is modeling?

642


What language is windows 1.0 written?

571


Is it acceptable to declare/define a variable in a c header?

678


What are keywords in c with examples?

600


about c language

1597


How do you search data in a data file using random access method?

829


Tell me when would you use a pointer to a function?

603