ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2265)
 C++ interview questions  C++ Interview Questions (1119)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (648)
Question
program for swapping two strings by using pointers in c language
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
#include <stdio.h>
void fastSwap (char **k, char **l)
{
char *t = *k;
*k = *l;
*l = t;
}
int main ()
{
char num1[] = "abc";
char num2[] = "def";
fastSwap ((char**)&num1,(char**)&num2);
printf ("%s\n",num1);
printf ("%s\n",num2);
return 0;
}
 
Is This Answer Correct ?    3 Yes 1 No
Umesh
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write a program to generate 1st n fibonacci prime number   11
Given a string write a program to print all alphabetical characters in the order of their occurance first,followed by the sum of the numeric characters then followed by the special characters in the order of their occurance. wipro 1
Find greatest number out of 10 number without using loop. Tcs 5
what is const volatile?   2
a simple program in c language IBM 5
what is output of the following statetment?Printf(%x, -1<<4); ?   5
how to find the binary of a number? Infosys 10
What is the difference between CV and Resume ?   2
difference between memcpy and strcpy   1
I need to take a sentence from input and sort the words alphabetically using the C programming language. Note: This is C not C++. qsort and strtok not allowed Aspire 4
Find if a number is power of two or not?   1
What is the relation between # and include<stdio.h> HCL 5
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com