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

Answer Posted / ramu pasupuleti

#include<stdio.h>
#include<conio.h>
{
printf("enter a,b values");
a=a+b;
a=a-b;
b=a-b;
printf("%d%d",a,b);
getch();
}

Is This Answer Correct ?    2 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure in c language?

827


Can you return null in c?

860


Write a program to print "hello world" without using a semicolon?

844


Write a program that accept anumber in words

1470


Explain which function in c can be used to append a string to another string?

833


What are register variables? What are the advantage of using register variables?

897


Can a file other than a .h file be included with #include?

872


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7773


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6265


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1055


What are the disadvantages of c language?

865


Why is extern used in c?

829


Once I have used freopen, how can I get the original stdout (or stdin) back?

830


What functions are used in dynamic memory allocation in c?

785


Difference between constant pointer and pointer to a constant.

821