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 |
Tell me about low level programming languages.
What are the concepts introduced in OOPs?
How can I discover how many arguments a function was actually called with?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
Can we increase size of array in c?
Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me
How can I get Single byte from 'int' type variable? Can we alter single bit or multiple bits in int type variable? if so, How?
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
5 Answers Vector, Vector Solutions,
#include<stdio.h> #include<conio.h> void main() { char ch='\356'; printf("%d",ch); } o/p=-18 why?plz.explain
When should volatile modifier be used?
How can you pass an array to a function by value?
which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;