wat are the two methods for swapping two numbers without
using temp variable??
Answers were Sorted based on User's Feedback
Answer / vijayakumar kanagasabai
main()
{
int a=4;b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("After swapping: a=%d, b=%d",a,b);
}
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / saida
int a=4,b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a^b;
b=a^b;
a=a^b;
printf("After swapping: a=%d, b=%d",a,b);
}
Is This Answer Correct ? | 2 Yes | 0 No |
What is the difference b/w Structure & Array?
Does c have function or method?
what is an inline function?
do ne body have any idea about the salary for the we r going to have interview. yup .. u got it right ..i m talking abt NIC.
WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h> #include<conio.h> void main() { int k=20; printf("%d%d%d%d",k,k++,++k,k); getch(); }
simple program of graphics and their output display
Should I learn c before c++?
How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?
Convert the following expression to postfix and prefix (A+B) * (D-C)
void main() { int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} }; int (*p)[2]; int i,j,*pint; for(i=0;i<=3;i++) { p=&s[i]; pint=p; printf("\n"); for(j=0;j<=1;j++) printf("%d",*(pint+j)); } } while running this program it shows a warning-suspicious pointer conversion ie pint=p; my que is why should we assign the value of p to pint again.why cant we use it directly as *(p+j)..but if i use like tat the o/p is garbage value..
which operator is known as dummy operator in c?
what about "char *(*(*a[])())();"