program for swapping two strings by using pointers in c language
Answer / umesh
#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 ? | 9 Yes | 8 No |
What is c definition?
write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR
write a program to print the all 4digits numbers & whose squares must me even numbers?
What is pivot in c?
The C language terminator is a.semicolon b.colon c.period d.exclamation mark
What is the use of function overloading in C?
what is the output of the program and explain why?? #include<stdio.h> void main ( ) { int k=4,j=0: switch (k) { case 3; j=300; case 4: j=400: case 5: j=500; } printf (ā%d\nā,j); }
Write a program that an operator and two operands read from input operand operator on the implementation and results display.
int i=0,j; j=++i + ++i ++i; printf(" %d",j);
Write a C program to read the internal test marks of 25 students in a class and show the number of students who have scored more than 50% in the test. Make necessary assumptions.
hi, which software companys will take,if d candidate's % is jst 55%?
What does the format %10.2 mean when included in a printf statement?