Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can u write a program in C, which does not use = (eqaul)or
any arithmatic assignment(like -=,+=,*= etc) operator to
swap to number?

Answer Posted / musa

swapping x and y using z as intermediary

memcpy(&z, &x, sizeof(x));
memcpy(&x, &y, sizeof(x));
memcpy(&y, &z, sizeof(x));

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

2024


Is c programming hard?

970


What are local static variables? How can you use them?

1079


Is c object oriented?

907


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4238


What are the rules for the identifier?

1113


What is the difference between array and pointer in c?

1085


What is far pointer in c?

1225


How can you tell whether a program was compiled using c versus c++?

1043


How does sizeof know array size?

1066


What is getch () for?

1142


What do you mean by dynamic memory allocation in c? What functions are used?

1103


Explain the properties of union.

1019


Why c is called free form language?

965


1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

4531