How to swap 3 numbers without using 4th variable?
Answers were Sorted based on User's Feedback
Answer / ilana
The target is a<-b b<-c c<- a
------------------------------------
a = a+b+c ; // a+b+c b c
c = c+b; // a+b+c b b+c
b = c-b; // a+b+c c b+c
c = a-c; // a+b+c c a
a = a-(b+c) // b c a
Is This Answer Correct ? | 12 Yes | 7 No |
What are local variables c?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What are the advantages and disadvantages of c language?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;
Explain what are the __date__ and __time__ preprocessor commands?
What is the exact difference between '\0' and ""
in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n
where does malloc() function get the memory?
what is recursion in C
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
How to print "Hi World" without using semi colon?