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

Answer Posted / srinath, hyd

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 ?    7 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an lvalue in c?

698


How can I handle floating-point exceptions gracefully?

636


What is the difference between array and pointer?

571


What are local static variables?

621


Differentiate between calloc and malloc.

762






What is difference between static and global variable in c?

541


How do you generate random numbers in C?

662


how to find anagram without using string functions using only loops in c programming

2720


How can you return multiple values from a function?

637


How can I write a function analogous to scanf?

662


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1204


Can you write the function prototype, definition and mention the other requirements.

664


Explain how do you print an address?

661


In which header file is the null macro defined?

860


Explain how can you restore a redirected standard stream?

594