C language interview questions solution for freshers beginners placement tricky good pointers answers explanation operators data types arrays structures functions recursion preprocessors looping file handling strings switch case if else printf advance linux objective mcq faq online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c++ tutorials and pdf
11 comments:
it would be great if you can add algorithms and flowcharts to the programs....
swaping of 2 functions
It doesn't work!!!
lol
It works perfectly
Hi
How can I do the same with the xor operator ?(without using third variable)
temp[j]='\0' what does that mean?
temp[j]='\0' what does that mean?
#include
#include
int main()
{
char str1[10],str2[10],str3[10];
printf("before swapping:");
gets(str1);
gets(str2);
strcpy(str3,str1);
strcpy(str1,str2);
strcpy(str2,str3);
printf("after swapping\n");
puts(str1);
puts(str2);
}
/*OUTPUT:
before swapping:
abc
def
after swapping:
def
abc*/
Tempriry string for using swapin g
Good programmer
Post a Comment