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 (2254)
 C++ interview questions  C++ Interview Questions (1111)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (646)
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
 
how to use virual function in real time example CTS 1
implement NAND gate logic in C code without using any bitwise operatior. Alcatel 4
do u print this format '(((())))'. This brackets is based on user input like 4 or 5 or 6,without using any loop's? Oracle 1
prototype of sine function. Cadence 2
Which of the following about the C comments is incorrect ? a.commentscan go over multiple lines b.comments can start any where in the line c.a line can contain comments with out any language statements d.comments can occur within comments TCS 6
what are the compilation steps? ( i want inside the compiler )   2
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters? CMC 2
what is the return type of printf   3
get any number as input except 1 and the output will be 1.without using operators,expressions,array,structure.don't print 1 in printf statement   3
coding for Fibonacci.?   1
printf("%d",(printf("Hello")); What it returns? TCS 31
what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }   6
 
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