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

Difference between Function to pointer and pointer to function

625


Explain what is the benefit of using const for declaring constants?

612


How can I handle floating-point exceptions gracefully?

632


What is the auto keyword good for?

616


What is the use of sizeof?

550






Explain the difference between malloc() and calloc() in c?

573


Can you please explain the scope of static variables?

597


For what purpose null pointer used?

606


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

1786


Where define directive used?

600


Is c is a low level language?

559


What are the types of type qualifiers in c?

645


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

1779


What’s the special use of UNIONS?

655


Why is python slower than c?

600