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

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

1742


What is anagram in c?

521


What is the use of pointers in C?

624


Why is c fast?

611


What is a pointer on a pointer in c programming language?

623






Is malloc memset faster than calloc?

622


Is the exit() function same as the return statement? Explain.

667


what are enumerations in C

726


What does %p mean?

598


What is uint8 in c?

647


Explain what are the __date__ and __time__ preprocessor commands?

596


Explain what does the function toupper() do?

638


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

639


What is the difference between text files and binary files?

680


What is far pointer in c?

815