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 |
write a program to print calender using for loop.
Write a program on swapping (100, 50)
Write a Program to accept different goods with the number, price and date of purchase and display them
yogesh patil in dell
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What are formal parameters?
read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50
State the difference between realloc and free.
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.
What are run-time errors?
What is the proper way of these job Tell me about there full work